CVE-2026-42290

protobufjs-cli: OS Command Injection

Published May 13, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The protobufjs-cli vulnerability allows an attacker who can control the file paths passed to the pbts command to inject shell metacharacters into the command string that is executed via child_process.exec. This injection enables arbitrary shell command execution, effectively Remote Code Execution on the system where the CLI is run. The weakness is a classic instance of CWE-78, OS command injection.

Affected Systems

The flaw exists in the protobuf.js command line add‑on for all versions prior to 1.2.1 in the 1.x series and prior to 2.0.2 in the 2.x series. Users running any of those pre‑patched releases are impacted.

Risk and Exploitability

The CVSS score of 7.8 indicates high severity. The EPSS score is not available, and the vulnerability is not listed in CISA KEV, implying no confirmed exploitation yet. Because the problem is triggered by executing the CLI locally with untrusted file names, the likely attack vector is local; an attacker who can run pbts and influence the input file paths can easily inject shell commands, resulting in full control over the executing environment.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade protobuf.js to at least version 1.2.1 for the 1.x line or 2.0.2 for the 2.x line to eliminate the CLI path injection vulnerability.
  • If an upgrade cannot be performed immediately, run pbts only with trusted file paths, ensuring that the paths contain no shell metacharacters and that they are validated or escaped before being passed to the tool.
  • After applying the upgrade or implementing the temporary input restriction, monitor system logs for unexpected or malicious shell executions and verify that pbts no longer assembles and executes shell command strings based on file paths.

Generated by OpenCVE AI on May 13, 2026 at 17:04 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-f84p-cvgm-xgjj protobuf.js is Vulnerable to OS Command Injection in the CLI
History
Type Values Removed Values Added
First Time appeared Protobufjs Project
Protobufjs Project protobufjs-cli
CPEs cpe:2.3:a:protobufjs_project:protobufjs-cli:*:*:*:*:*:node.js:*:*
Vendors & Products Protobufjs Project
Protobufjs Project protobufjs-cli
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Protobuf
Protobuf protobuf
Vendors & Products Protobuf
Protobuf protobuf
Type Values Removed Values Added
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.
Title protobufjs-cli: OS Command Injection
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
May 18, 2026, 1:54 PM
Reserved
Apr 26, 2026, 12:13 PM
Status
Analyzed
Published
May 13, 2026, 4:16 PM
Modified
Nov 11, 2026, 8:10 PM