{"id":"CVE-2026-57998","aliases":["CVE-2026-57998"],"related":[],"kind":"vulnerability","state":"published","title":"better-npm-audit OS Command Injection via registry flag","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"better-npm-audit hasta la 3.11.0, y la versión preliminar 4.0.0-rc.2, construye su comando npm audit interpolando la opción --registry proporcionada por el usuario en una cadena de comando en src/hylers/hyleInput.ts sin validación ni entrecomillado, luego pasa esa cadena a child_process.exec() en index.ts, lo que genera un shell. Un valor de registro que contiene metacaracteres de shell como un punto y coma, una tubería o una sustitución de comando ejecuta comandos arbitrarios del sistema operativo con los privilegios del proceso que ejecuta la auditoría.","source":"nvd"}],"published":"2026-08-22T12:26:30.536Z","modified":"2026-10-12T16:10:00.220Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":8.5,"rating":"HIGH"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"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","score":8.5,"rating":"HIGH"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"type":"semver","introduced":"0","lastAffected":"3.11.0","status":"affected"},{"type":"semver","version":"4.0.0-rc.2","status":"affected"}],"vendor":"jeemok","product":"better-npm-audit","source":"cvelist"}],"references":[{"url":"https://github.com/jeemok/better-npm-audit/issues/119","tags":["exploit","issue-tracking"],"sources":["cvelist","nvd"]},{"url":"https://github.com/jeemok/better-npm-audit","tags":["product"],"sources":["cvelist","nvd"]},{"url":"https://github.com/jeemok/better-npm-audit/blob/fd99a0f41ff4342b8a0a6fdbe5a17261de3d0544/src/handlers/handleInput.ts#L30-L37","tags":["technical-description"],"sources":["cvelist","nvd"]},{"url":"https://github.com/jeemok/better-npm-audit/blob/fd99a0f41ff4342b8a0a6fdbe5a17261de3d0544/index.ts#L34","tags":["technical-description"],"sources":["cvelist","nvd"]},{"url":"https://github.com/jeemok/better-npm-audit/pull/120","tags":["issue-tracking","patch"],"sources":["cvelist","nvd"]},{"url":"https://www.vulncheck.com/advisories/better-npm-audit-os-command-injection-via-registry-flag","tags":["third-party-advisory"],"sources":["cvelist","nvd"]}],"credits":["MD Mahmidul Hasan (BL4CK 570RM)"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-08-25T16:42:59.046Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-57998","url":"https://www.cve.org/CVERecord?id=CVE-2026-57998","licence":"CVE Terms of Use","modified":"2026-08-29T11:47:30.693Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-57998","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-57998","licence":"Public domain","modified":"2026-10-12T16:10:00.220Z"}],"updatedAt":"2026-11-25T22:59:34.864Z","epss":{"score":0.0021,"percentile":0.11918,"date":"2026-12-01T12:00:22.000Z"}}