CVE-2026-42290: Protobufjs cli Protobuf.js Is Vulnerable To OS Vulnerability
HIGHCVE-2026-42290 is a HIGH (CVSS 7.8) protobuf.js is vulnerable to os vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting Protobufjs cli libraries in the npm ecosystem. The issue involves protobuf.js is vulnerable to os command injection in the cli. Remediation is available by upgrading affected packages to version 1.2.1, 2.0.2.
CVE-2026-42290 at a Glance
Security Impact
CVSS: 7.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-42290
To remediate this vulnerability, upgrade all affected Protobufjs cli dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install protobufjs-cli@1.2.1
npm install protobufjs-cli@2.0.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls protobufjs-cli
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-42290, inspect your project dependencies using npm:
npm ls protobufjs-cli
Analyze the terminal output to locate any version of Protobufjs cli in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.1), your application is affected.
Note: The npm ls protobufjs-cli command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In Protobufjs cli, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-42290 Affected Protobufjs cli Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
protobufjs-cli
|
npm |
< 1.2.1
|
1.2.1
|
|
protobufjs-cli
|
npm |
≥ 2.0.0
< 2.0.2
|
2.0.2
|
References
Frequently Asked Questions
What is CVE-2026-42290?
Which Protobufjs cli versions are affected?
What version fixes CVE-2026-42290?
Is protobufjs-cli affected?
What is the CVSS score of CVE-2026-42290?
What CWE is associated with CVE-2026-42290?
How can I check npm dependencies for CVE-2026-42290?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f84p-cvgm-xgjj",
"modified" : "2026-05-14T20:31:52Z",
"published" : "2026-05-12T14:59:45Z",
"aliases" : [ "CVE-2026-42290" ],
"summary" : "protobuf.js is Vulnerable to OS Command Injection in the CLI",
"details" : "## Summary\n\n`pbts` invoked JSDoc by building a shell command string from input file paths and executing it through `child_process.exec`. File paths containing shell metacharacters could therefore be interpreted by the shell instead of being passed to JSDoc as plain arguments.\n\n## Impact\n\nAn attacker who can control file names or paths passed to `pbts` may be able to execute arbitrary shell commands with the privileges of the process running `pbts`.\n\nThis affects the protobufjs CLI tooling path. The protobufjs runtime APIs for encoding, decoding, parsing, and loading protobuf messages are not directly affected by this issue.\n\n## Preconditions\n\n- The application or user must invoke `pbts` on file paths influenced by an attacker.\n- The attacker must be able to supply or create a path containing shell-significant characters.\n- The vulnerable `pbts` version must execute the generated JSDoc command through a shell.\n\n## Workarounds\n\nDo not run affected versions of `pbts` on attacker-controlled file names or paths. If this cannot be avoided, sanitize or rename input files before invoking `pbts`, or run the CLI in an isolated environment with minimal privileges.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "protobufjs-cli"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.2.0"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "protobufjs-cli"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.0.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.0.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-f84p-cvgm-xgjj"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42290"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/protobufjs/protobuf.js"
}, {
"type" : "WEB",
"url" : "https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-cli-v1.2.1"
}, {
"type" : "WEB",
"url" : "https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-cli-v2.0.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-78" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-12T14:59:45Z",
"nvd_published_at" : "2026-05-13T16:16:47Z"
}
}