# MAL-2026-4266: Malicious code in discovery-build (npm)


- **Type:** Malicious package
- **Package:** `discovery-build` (npm)
- **Published:** 23 May 2026

## What is MAL-2026-4266?

MAL-2026-4266 is a malicious package in discovery-build, published on 23 May 2026. 

### Official description

package.json declares scripts.postinstall=node postinstall.js, which executes unconditionally on `npm install`. The script collects host identifiers (os.hostname(), os.platform(), username, cwd), reads /etc/passwd via fs.readFileSync('/etc/passwd','utf8'), and bulk-enumerates the installer's environment variables (Object.entries(process.env).slice(0, 30)) — capturing whatever CI tokens, AWS credentials, npm tokens, or other secrets happen to be in scope. The collected data is POSTed as JSON over HTTPS to bl0oxto4g54mptbwu8q8i1r0mrsjgg45.oastify.com, a Burp Collaborator out-of-band testing subdomain controlled by whoever generated the payload. The package's self-description as a 'security research canary' does not change installer-side impact: any developer or CI pipeline that installs this package leaks host identity, /etc/passwd, and a slice of environment secrets to an external host without consent.

The OpenSSF Package Analysis project identified 'discovery-build' @ 1.0.1 (npm) as malicious.

It is considered malicious because:

- The package communicates with a domain associated with malicious activity.

- The package executes one or more commands associated with malicious behavior.

## What should I do about MAL-2026-4266?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

## Fix prompt for AI coding agents

```text
MAL-2026-4266 is a malicious package: discovery-build (npm). Every version was published to cause harm.

Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.

Reference: https://insights.sbomify.com/MAL-2026-4266/ (Markdown: https://insights.sbomify.com/MAL-2026-4266/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/MAL-2026-4266

---
From sbomify Insights: https://insights.sbomify.com/MAL-2026-4266/
Summaries are generated and may contain mistakes; the official description above is the record.
