CVE-2026-57998: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in jeemok better-npm-audit
Description
CVE-2026-57998 is an OS command injection vulnerability in the jeemok better-npm-audit tool. Versions up to 3.11.0 and the 4.0.0-rc.2 prerelease build a shell command by directly interpolating user input from the --registry option without validation or quoting. This allows an attacker to execute arbitrary OS commands with the privileges of the process running the audit.
CVSS v4.0
Score 8.5high
Affected software
jeemok
better-npm-audit
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability exists because better-npm-audit constructs its npm audit command by embedding the user-supplied --registry option directly into a command string in src/handlers/handleInput.ts without sanitization. This string is then passed to child_process.exec() in index.ts, which executes it in a shell. If the registry value contains shell metacharacters such as semicolons, pipes, or command substitutions, arbitrary OS commands can be executed with the same privileges as the better-npm-audit process. Affected versions include all versions up to and including 3.11.0 and the 4.0.0-rc.2 prerelease.
Potential Impact
Successful exploitation allows an attacker to execute arbitrary operating system commands with the privileges of the better-npm-audit process. This can lead to full system compromise depending on the privileges of the user running the tool. The CVSS 4.0 score is 8.5 (high severity), reflecting the potential for significant impact without requiring privileges but requiring user interaction.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, users should avoid passing untrusted input to the --registry option or avoid using affected versions. Consider running the tool with minimal privileges to reduce impact.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-06-26T17:58:05.796Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a899b98acd9273b490877f2
Added to database: 08/22/2026, 12:52:40 UTC
Last enriched: 09/10/2026, 15:03:42 UTC
Last updated: 10/07/2026, 06:48:17 UTC
Views: 36
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.