CVE-2026-57998
published high CVSS 4.0 · 8.5better-npm-audit OS Command Injection via registry flag
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| jeemok | — | better-npm-audit0 through 3.11.0 · 4.0.0-rc.2 · Other versions: unaffected | Affected | Not stated | VulnCheck |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.5 / 10
- Severity
- high
- Provider
- VulnCheck · cna
- Vector string
- 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
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 7.8 | high | VulnCheck · cna | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| jeemok | better-npm-audit | 0 through 3.11.0 (affected · semver)4.0.0-rc.2 (affected · semver)Default: unaffected | VulnCheck · cna |
Weaknesses
1- CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
References
6- https://github.com/jeemok/better-npm-audit
- https://github.com/jeemok/better-npm-audit/blob/fd99a0f41ff4342b8a0a6fdbe5a17261de3d0544/index.ts#L34
- https://github.com/jeemok/better-npm-audit/blob/fd99a0f41ff4342b8a0a6fdbe5a17261de3d0544/src/handlers/handleInput.ts#L30-L37
- GitHub Issue #119 https://github.com/jeemok/better-npm-audit/issues/119
- https://github.com/jeemok/better-npm-audit/pull/120
- VulnCheck Advisory: better-npm-audit OS Command Injection via registry flag https://www.vulncheck.com/advisories/better-npm-audit-os-command-injection-via-registry-flag
Provider assertions
2VulnCheck · cna
better-npm-audit OS Command Injection via registry flag
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- c11e6d871b37e675cf0995d56d299278ee61804387b7a20557660af4bfa72500
- Ingested
- 23 Sep 2026, 09:22:08 UTC
- Source record
- Official CVE record