{"id":"GHSA-f84p-cvgm-xgjj","revision":"8dba0ce62a9c4233b4c2f0342e8024a4","records":[{"revision":"8dba0ce62a9c4233b4c2f0342e8024a4","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-f84p-cvgm-xgjj","aliases":["CVE-2026-42290"],"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.","state":0,"publishedAt":"2026-05-12T14:59:45+00:00","modifiedAt":"2026-09-10T03:50:46.7813561+00:00","affected":[{"ecosystem":"npm","name":"protobufjs-cli","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.2.1"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"npm","name":"protobufjs-cli","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"2.0.0"},{"kind":"fixed","version":"2.0.2"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-f84p-cvgm-xgjj","https://nvd.nist.gov/vuln/detail/CVE-2026-42290","https://github.com/protobufjs/protobuf.js","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"],"sourceUrl":"https://github.com/advisories/GHSA-f84p-cvgm-xgjj","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-f84p-cvgm-xgjj","identifiers":["GHSA-f84p-cvgm-xgjj","CVE-2026-42290"]},"retained":false,"historicalAffected":[]}],"coverage":[]}