7.8high
protobufjs-cli: OS Command Injection
- Severity
- 7.8high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.18% (higher than 8% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-f84p-cvgm-xgjj
Description
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
| Product or package | Versions | Reported by |
|---|---|---|
| protobufjs protobuf.js | >= 2.0.0, < 2.0.2, < 1.2.1 | CVE List |
| protobufjs-cli (npm) | before 1.2.1, from 2.0.0 before 2.0.2 | GitHub Advisory Database |
| protobufjs_project protobufjs-cli | before 1.2.1, from 2.0.0 before 2.0.2 | NVD |
All scores
| GitHub_M | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| GitHub | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
| NVD | 7.8high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
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.
GitHub Advisory Database
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
- The application or user must invoke
pbtson file paths influenced by an attacker. - The attacker must be able to supply or create a path containing shell-significant characters.
- The vulnerable
pbtsversion 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.
NVD (es)
protobufjs-cli es el complemento de línea de comandos para protobuf.js. Antes de 1.2.1 y 2.0.2, pbts invocaba JSDoc al construir una cadena de comando de shell a partir de rutas de archivos de entrada y ejecutarla a través de child_process.exec. Las rutas de archivos que contenían metacaracteres de shell podían, por lo tanto, ser interpretadas por el shell en lugar de ser pasadas a JSDoc como argumentos simples. Esta vulnerabilidad está corregida en 1.2.1 y 2.0.2.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-42290 changed 2026-05-18 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-f84p-cvgm-xgjj changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-42290 changed 2026-11-11 | Public domain |