{"id":"CVE-2026-42290","aliases":["EUVD-2026-29996","GHSA-f84p-cvgm-xgjj"],"status":"published","title":"protobufjs-cli: OS Command Injection","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.","severity":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00132,"percentile":0.02818,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-78"],"published":"2026-05-12T14:59:45Z","modified":"2026-10-28T02:31:05Z","fixes":[{"ecosystem":"npm","package":"protobufjs-cli","fixed_in":["1.2.1","2.0.2"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"protobufjs-cli","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.2.0"},{"fixed":"1.2.1"}]}]},{"source":"ghsa","ecosystem":"npm","package":"protobufjs-cli","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0"},{"last_affected":"2.0.1"},{"fixed":"2.0.2"}]}]},{"source":"osv","ecosystem":"npm","package":"protobufjs-cli","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.2.1"}]}]},{"source":"osv","ecosystem":"npm","package":"protobufjs-cli","ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0"},{"fixed":"2.0.2"}]}]}],"products":[{"vendor":"protobufjs","product":"protobuf.js"},{"vendor":"protobufjs_project","product":"protobufjs-cli"}],"references":[{"url":"https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-f84p-cvgm-xgjj","tags":["x_refsource_CONFIRM","Vendor Advisory","advisory","web"]},{"url":"https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-cli-v1.2.1","tags":["web"]},{"url":"https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-cli-v2.0.2","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42290","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-f84p-cvgm-xgjj"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/42xxx/CVE-2026-42290.json","tags":["advisory"]},{"url":"https://github.com/protobufjs/protobuf.js","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-42290","title":"protobufjs-cli: OS Command Injection","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.","status":"published","published":"2026-05-13T14:49:30.03Z","modified":"2026-05-18T13:54:57.889Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"cna"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T13:40:23.731501Z"}],"euvd":[{"id":"EUVD-2026-29996","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.","status":"published","published":"2026-05-13T14:49:30Z","modified":"2026-05-18T13:54:57Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"updated_at":"2026-11-02T18:21:16.642345Z"}],"ghsa":[{"id":"GHSA-f84p-cvgm-xgjj","title":"protobuf.js is Vulnerable to OS Command Injection in the CLI","description":"## 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.","status":"published","published":"2026-05-12T14:59:45Z","modified":"2026-05-14T20:31:53Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T14:40:09.033429Z"}],"nvd":[{"id":"CVE-2026-42290","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.","status":"published","published":"2026-05-13T16:16:47.16Z","modified":"2026-06-17T10:47:38.587Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"secondary"},{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T14:12:19.020465Z"}],"osv":[{"id":"CVE-2026-42290","title":"protobufjs-cli: OS Command Injection","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.","status":"published","published":"2026-05-13T14:49:30.03Z","modified":"2026-10-28T02:31:05.697165971Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T15:45:04.117819Z"},{"id":"GHSA-f84p-cvgm-xgjj","title":"protobuf.js is Vulnerable to OS Command Injection in the CLI","description":"## 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.","status":"published","published":"2026-05-12T14:59:45Z","modified":"2026-09-10T03:50:46.78135608Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-78"],"updated_at":"2026-11-02T15:46:46.006631Z"}]}}
