high7.8
CVE-2026-42290
protobuf.js is Vulnerable to OS Command Injection in the CLI
Impact
protobufjs-cli is the command line add-on for protobuf.js. Prior to 1.2.1 and 2.0.2, 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. This vulnerability is fixed in 1.2.1 and 2.0.2.
Affected packages
| Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|
| npm | protobufjs-cli | <= 1.2.0 | 1.2.1 |
Affected products
| Vendor | Product | Affected versions |
|---|---|---|
| Protobufjs Project | Protobufjs-Cli | before 1.2.1 from 2.0.0 before 2.0.2 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://github.com/advisories/GHSA-f84p-cvgm-xgjj
- https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-f84p-cvgm-xgjj
- https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-cli-v1.2.1
- https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-cli-v2.0.2
- https://nvd.nist.gov/vuln/detail/CVE-2026-42290