# CVE-2026-57998: better-npm-audit OS Command Injection via registry flag

- Severity: High 8.5 (CVSS:4.0, scored by VulnCheck) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-22T12:26:30.536Z
- Modified: 2026-10-12T16:10:00.220Z
- Weaknesses: CWE-78
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: 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.

(As written by CVE List.)

## Affected

- jeemok better-npm-audit: up to 3.11.0; 4.0.0-rc.2

## Every score

- VulnCheck: CVSS:4.0 8.5 High `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`
- VulnCheck: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`

## References

- <https://github.com/jeemok/better-npm-audit/issues/119> (exploit, issue-tracking)
- <https://github.com/jeemok/better-npm-audit> (product)
- <https://github.com/jeemok/better-npm-audit/blob/fd99a0f41ff4342b8a0a6fdbe5a17261de3d0544/src/handlers/handleInput.ts#L30-L37> (technical-description)
- <https://github.com/jeemok/better-npm-audit/blob/fd99a0f41ff4342b8a0a6fdbe5a17261de3d0544/index.ts#L34> (technical-description)
- <https://github.com/jeemok/better-npm-audit/pull/120> (issue-tracking, patch)
- <https://www.vulncheck.com/advisories/better-npm-audit-os-command-injection-via-registry-flag> (third-party-advisory)

## Sources

- CVE List: [CVE-2026-57998](https://www.cve.org/CVERecord?id=CVE-2026-57998), CVE Terms of Use, modified 2026-08-29
- NVD: [CVE-2026-57998](https://nvd.nist.gov/vuln/detail/CVE-2026-57998), Public domain, modified 2026-10-12

---

Page: https://cve.day/CVE-2026-57998 · Whole record: https://cve.day/CVE-2026-57998.json · Rebuilt by cve.day 2026-11-25T22:59:34.864Z
