CVE-2026-44295

protobufjs-cli: Code injection in pbjs static output from crafted schema names

Published May 13, 2026 CVSS 3.1 · 8.7 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, pbjs static code generation could emit unsafe JavaScript identifiers derived from schema-controlled names. When generating static JavaScript from a crafted schema or JSON descriptor, certain namespace, enum, service, or derived full names could be written into the generated output without sufficient sanitization. This vulnerability is fixed in 1.2.1 and 2.0.2.

Analysis

AI-generated

Technical impact

pbjs static code generation emits unsafe JavaScript identifiers derived from schema names, enabling an attacker to inject arbitrary JavaScript into the generated output. This injection can lead to remote code execution if the produced code is executed on a system with sufficient privileges.

Affected Systems

The vulnerability affects the protobuf.js command line add‑on, protobufjs-cli, specifically versions of pbjs older than 1.2.1 and 2.0.2. Only the static code generation feature is impacted.

Risk and Exploitability

The CVSS score of 8.7 categorizes this as a high‑severity flaw. No EPSS score is available and it is not listed in CISA KEV. Exploitation requires delivering a crafted schema or JSON descriptor to the pbjs CLI and subsequently executing the resulting JavaScript; the likely attack vector is a build pipeline or deployment process that consumes third‑party schemas.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade protobuf.js to version 1.2.1 or later, or 2.0.2 or later, ensuring pbjs CLI uses the patched code generation logic.
  • If an upgrade is not immediately possible, avoid executing static JavaScript generated by pbjs from untrusted schemas; run the generation in a restricted environment.
  • Validate or sanitize schema and JSON descriptor names prior to passing them to pbjs CLI to eliminate unsafe identifiers.

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

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-6r35-46g8-jcw9 protobuf.js: Code injection in pbjs static output from crafted schema names
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
First Time appeared Protobuf
Protobuf protobuf
Vendors & Products Protobuf
Protobuf protobuf
Type Values Removed Values Added
Metrics ssvc

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

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, pbjs static code generation could emit unsafe JavaScript identifiers derived from schema-controlled names. When generating static JavaScript from a crafted schema or JSON descriptor, certain namespace, enum, service, or derived full names could be written into the generated output without sufficient sanitization. This vulnerability is fixed in 1.2.1 and 2.0.2.
Title protobufjs-cli: Code injection in pbjs static output from crafted schema names
Weaknesses CWE-94
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
May 13, 2026, 6:20 PM
Reserved
May 5, 2026, 5:39 PM
Status
Analyzed
Published
May 13, 2026, 4:16 PM
Modified
Nov 11, 2026, 8:10 PM