CVE-2026-57998 better-npm-audit OS Command Injection via registry flag
HighCVSS 8.5
EPSS 0.21%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: total
Description
better-npm-audit through 3.11.0, and the 4.0.0-rc.2 prerelease, builds its npm audit command by interpolating the user-supplied --registry option into a command string in src/handlers/handleInput.ts without validation or quoting, then passes that string to child_process.exec() in index.ts, which spawns a shell. A registry value containing shell metacharacters such as a semicolon, pipe, or command substitution executes arbitrary operating system commands with the privileges of the process running the audit.
Upgrade path
1 package: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| npm better-npm-audit | <= 3.11.0; = 4.0.0-rc.2 | after 3.11.0 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| npm better-npm-audit | <= 3.11.0 | No fix listed |
| npm better-npm-audit | = 4.0.0-rc.2 | No fix listed |
References
- GitHub Issue #119 exploit issue-tracking
- github.com product
- github.com technical-description
- github.com technical-description
- github.com issue-tracking patch
- VulnCheck Advisory: better-npm-audit OS Command Injection via registry flag third-party-advisory
- ENISA EUVD EUVD-2026-64261 third-party-advisory