CVE-2026-57998 json
better-npm-audit OS Command Injection via registry flag
published 2mo ago modified 30d ago also EUVD-2026-64261
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 11%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- github.com/jeemok/better-npm-audit#120 pull request
Is CVE-2026-57998 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- total
- Assessed
- 2mo ago
Exploit prediction
0.21% chance of exploitation in the next 30 days, higher than 11% of all scored CVEs (FIRST EPSS, 2026-11-11).
Exploits and checks
- github.com https://github.com/jeemok/better-npm-audit/issues/119 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 8.5 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| CNA | 4.0 | 8.5 | CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Inferred packages
No advisory lists a package for this vulnerability yet. The CVE names these as products and links their GitHub repository, and the package registry names the same repository, so they are probably the affected packages. Low confidence: the versions are the CVE’s own for the product, and a stack check reports the package as unchecked when there are none.
| ecosystem | package | repository | affected |
|---|---|---|---|
| npm | better-npm-audit | jeemok/better-npm-audit | no versions given |
Affected products
- jeemok better-npm-audit
Classification
- Weakness
-
- CWE-78 Improper Neutralization of Special Elements used in an OS Command
References
-
github.com
/jeemok/better-npm-audit/pull/120
issue-tracking, patch
-
github.com
/jeemok/better-npm-audit/issues/119
issue-tracking, exploit
-
github.com
/jeemok/better-npm-audit
product
-
github.com
/jeemok/better-npm-audit/blob/fd99a0f41ff4342b8a0a6fdbe5a17261de3d0544/src/handlers/handleInput.ts#L30-L37
technical-description
-
github.com
/jeemok/better-npm-audit/blob/fd99a0f41ff4342b8a0a6fdbe5a17261de3d0544/index.ts#L34
technical-description
-
vulncheck.com
/advisories/better-npm-audit-os-command-injection-via-registry-flag
third-party-advisory
Sources
- CVE List CVE-2026-57998
- NVD CVE-2026-57998
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.