protobufjs-cli
Affected
- introduced
0, fixed1.2.1(semver)
Fixed versions
1.2.1
Fix
- Fixed version
1.2.1npm install [email protected]
Advisory
Also known as: CVE-2026-42290
protobuf.js is Vulnerable to OS Command Injection in the CLI
Summary
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.
Impact
An 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.
This 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.
Preconditions
pbts on file paths influenced by an attacker.pbts version must execute the generated JSDoc command through a shell.Workarounds
Do 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.
High Basis: The source's own band: HIGH
0, fixed 1.2.1 (semver)1.2.1
1.2.1npm install [email protected]2.0.0, fixed 2.0.2 (semver)2.0.2
2.0.2npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0