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.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/57xxx/CVE-2026-57998.json",
"unresolved_ranges": [
{
"source": "AFFECTED_FIELD",
"extracted_events": [
{
"introduced": "4.0.0-rc.2"
},
{
"last_affected": "4.0.0-rc.2"
}
]
}
],
"cwe_ids": [
"CWE-78"
],
"cna_assigner": "VulnCheck"
}{
"source": [
"AFFECTED_FIELD",
"DESCRIPTION"
],
"extracted_events": [
{
"introduced": "0"
},
{
"last_affected": "3.11.0"
},
{
"fixed": "3.11.0"
}
]
}