{"id":"CVE-2026-57998","summary":"better-npm-audit OS Command Injection via registry flag","details":"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.","modified":"2026-08-30T03:47:00.552622876Z","published":"2026-08-22T12:26:30.536Z","database_specific":{"unresolved_ranges":[{"source":"AFFECTED_FIELD","extracted_events":[{"introduced":"4.0.0-rc.2"},{"last_affected":"4.0.0-rc.2"}]}],"cna_assigner":"VulnCheck","cwe_ids":["CWE-78"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/57xxx/CVE-2026-57998.json"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/57xxx/CVE-2026-57998.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-57998"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/better-npm-audit-os-command-injection-via-registry-flag"},{"type":"REPORT","url":"https://github.com/jeemok/better-npm-audit/issues/119"},{"type":"FIX","url":"https://github.com/jeemok/better-npm-audit/pull/120"},{"type":"PACKAGE","url":"https://github.com/jeemok/better-npm-audit"},{"type":"ARTICLE","url":"https://github.com/jeemok/better-npm-audit/blob/fd99a0f41ff4342b8a0a6fdbe5a17261de3d0544/index.ts#L34"},{"type":"ARTICLE","url":"https://github.com/jeemok/better-npm-audit/blob/fd99a0f41ff4342b8a0a6fdbe5a17261de3d0544/src/handlers/handleInput.ts#L30-L37"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/jeemok/better-npm-audit","events":[{"introduced":"0"},{"fixed":"705e3639447b48b468c93303da382d80abeab23b"}],"database_specific":{"extracted_events":[{"introduced":"0"},{"last_affected":"3.11.0"},{"fixed":"3.11.0"}],"source":["AFFECTED_FIELD","DESCRIPTION"]}}],"versions":["v3.10.0","v3.9.0","v3.8.3","3.8.0","v3.7.3","v3.7.1","v3.6.0","v3.5.1","v3.4.0","v3.3.0","v3.2.1","v3.1.2","v3.1.1","v3.1.0","v3.0.1","v3.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-57998.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}