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.
Published: 2026-08-22
Score: 8.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

No vendor fix or workaround currently provided.

Additional remediation guidance may be available on OpenCVE Cloud.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 27 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Sun, 23 Aug 2026 16:45:00 +0000

Type Values Removed Values Added
First Time appeared Jeemok
Jeemok better-npm-audit
Vendors & Products Jeemok
Jeemok better-npm-audit

Sat, 22 Aug 2026 12:45:00 +0000

Type Values Removed Values Added
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.
Title better-npm-audit OS Command Injection via registry flag
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.5, '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'}


Subscriptions

Jeemok Better-npm-audit
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-29T11:47:30.693Z

Reserved: 2026-06-26T17:58:05.796Z

Link: CVE-2026-57998

cve-icon Vulnrichment

Updated: 2026-08-25T16:43:12.393Z

cve-icon NVD

Status : Received

Published: 2026-08-22T13:16:38.263

Modified: 2026-08-25T17:17:33.827

Link: CVE-2026-57998

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-23T16:40:01Z

Weaknesses