b2b-frontend-external-librarynpm
Advisory published Updated
b2b-frontend-external-library is a confirmed malicious npm package (MAL-2026-16008) that steals credentials and exfiltrates sensitive data (malicious versions 0.0.1, 9999.0.0). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in b2b-frontend-external-library (npm)
What this malware does
This package is malicious. It is not a real library. An attacker put it on the public npm registry. The package name is a copy of a private, internal package name. This is a dependency confusion attack. A build that gets the name from public npm installs this package in place of the real one.
The package.json has a preinstall script. npm runs this script during install. The script file is preinstall.js. It runs before a person can read the code.
The script collects data about the host. It reads the host name, the user name, the current directory, the install directory, the package name, the package version, the operating system, the Node.js version, and the npm user-agent text.
The script sends this data to remote servers. It uses three ways. First, it makes a DNS request to a subdomain of oast.online. It writes the token, the package name, the host name, and the user name into the DNS name as hex text. Second, it sends an HTTPS POST with the data as JSON to the same oast.online host. If HTTPS fails, it uses plain HTTP. Third, it sends an HTTP POST with the same JSON to a fixed IP address, 5.189.159.252. The beacon uses a fixed token, swisscom-oce-3b9f1c7a2e.
The index.js file does nothing. It is a placeholder. The code comments say this is authorized bug-bounty research. The behavior is still an unwanted install-time beacon. It sends host data to attacker-controlled servers without consent. All versions are malicious. Treat every host that installed this package as exposed. Remove the package. Look for DNS and HTTP traffic to the listed servers.
package.json declares a preinstall lifecycle script (preinstall.js) that runs on npm install. The script collects hostname, username, cwd, install path, platform/OS release, Node version, npm user-agent, and the resolved package name+version, then sends the data via a DNS lookup and two HTTP(S) POSTs to three hardcoded destinations: an OAST collector at dae7n4pijsh1ahi9684gu8get3kaiefc9.oast.online, a bare-IP HTTP endpoint at 5.189.159.252, and a URL under hackerone.com. The package name (b2b-frontend-external-library) and behavior match the dependency-confusion beacon pattern: any environment that resolves this public name during install unconditionally transmits identifying host and user information to third-party endpoints. Whether framed as bug-bounty research or not, the traced code performs unsolicited install-time collection and exfiltration of installer identifiers.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Credential / info stealerFind it
Search your lockfiles and build artifacts for b2b-frontend-external-library (2 malicious versions).
If you installed it — respond
b2b-frontend-external-library is built to steal secrets, so assume every credential the build or runtime could read is compromised. Remove it from your project and lockfile, then rotate ALL exposed secrets — npm/registry tokens, cloud keys, CI/CD secrets, SSH keys, and any .env values — from a known-clean machine. Audit logs for unauthorized use of those credentials.
Did it already run?
If b2b-frontend-external-library was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
- SafeDep · finder
Detect & block this
O3 blocks b2b-frontend-external-library-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the credential exfiltration and severs the channel.