VDB
Sign up

MAL-2026-16008

Malicious code in b2b-frontend-external-library (npm)

Details

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/b2b-frontend-external-library
Introduced in: 0

No fixed version published yet for b2b-frontend-external-library (npm). Pin to a known-safe version or switch to an alternative.

References