Vulnerability GHSA-f84p-cvgm-xgjj

High Risk
HIGH RISK
CVSS Score: 7.8
Score Range: 7.0–8.9
High severity vulnerabilities (CVSS 7.0–8.9). Serious vulnerabilities that should be prioritized soon after critical fixes.
5 months ago
May 12, 2026 at 02:59 PM UTC
protobuf.js is Vulnerable to OS Command Injection in the CLI
1.0.0-beta.0 - 1.2.0 and 2.0.0 - 2.0.2-experimental
1.0.0-beta.0 - 1.2.0 and 2.0.0 - 2.0.2-experimental

Summary

protobuf.js is Vulnerable to OS Command Injection in the CLI

Details

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 pbts on file paths influenced by an attacker.
  • The attacker must be able to supply or create a path containing shell-significant characters.
  • The vulnerable 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.

Impacted packages

Timeline

Published
5 months ago
May 12, 2026 at 02:59 PM UTC
Fixed (2.0.2)
6 months ago
April 27, 2026 at 11:05 PM UTC
Fixed (1.2.1)
6 months ago
April 28, 2026 at 12:45 AM UTC
Last Modified
1 month ago
September 10, 2026 at 03:50 AM UTC