Skip to main content

protobufjs-cli CVE-2026-54271

| EUVDEUVD-2026-38304 HIGH
Code Injection (CWE-94)
2026-06-15 https://github.com/protobufjs/protobuf.js GHSA-pr59-h9ph-3fr8
8.2
CVSS 3.1 · Vendor: https://github.com/protobufjs/protobuf.js
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify target build pipeline accepting JSON descriptors
  2. Delivery
    Craft malicious JSON descriptor with poisoned names
  3. Exploit
    Submit descriptor to pbjs static generation
  4. Install
    Generator emits attacker-controlled JavaScript
  5. C2
    Victim imports generated module
  6. Execute
    Affected API path invoked
  7. Impact
    Arbitrary code executes in build or runtime context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the victim's application or build pipeline invoke pbjs in static or static-module code-generation mode against a pre-parsed JSON descriptor whose names are attacker-controlled or attacker-influenced; descriptors produced by parsing trusted .proto files are explicitly not exploitable. After generation, the produced JavaScript file must be executed or imported by a victim process, and an affected generated API path must actually be invoked before the injected code runs. Limiting factors: the attacker needs an input channel that feeds JSON (not .proto) descriptors into pbjs static generation, the build/consumer workflow must execute the generated artifact, CVSS marks AC:H (a payload that survives the prior CVE-2026-44295 fix must be crafted) and UI:R (a human or automated build step must run the toolchain), and only npm protobufjs-cli <= 1.3.1 and 2.0.0-2.4.2 are vulnerable.

Impact

The CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:L) yields 8.2 High, but the real-world risk is materially lower than that headline suggests: exploitation is gated by AC:H (attacker must craft a JSON descriptor that bypasses an already-tightened name validator) and UI:R (a developer or build pipeline must actually feed the untrusted descriptor through pbjs and later import the generated file). No EPSS score, KEV listing, or SSVC decision was supplied in the input, and no public exploit identified at time of analysis. This is a build-toolchain / supply-chain code-injection issue rather than an internet-facing RCE, so prioritization should be high for organizations whose build systems ingest third-party or user-supplied JSON descriptors, and routine for those that only compile in-house .proto files. Because this is an incomplete-fix bypass of CVE-2026-44295, teams that previously patched only to the prior fix should treat 1.3.2 / 2.5.0 as the true remediation baseline.

Exploit ScenarioDerived

An attacker submits a crafted Protocol Buffer JSON descriptor (for example via a schema-registry upload, a CI job that accepts user-supplied descriptors, or a malicious dependency that ships .json schemas) to a project that runs pbjs --target static-module against it during build. The crafted descriptor contains a field or type name engineered to escape the identifier context inside the generator's emitted JavaScript, so the resulting .js file contains attacker-controlled statements. When a developer or downstream service later imports that generated module and exercises the affected API path, the injected code executes in that process; no public exploit identified at time of analysis, and the AC:H / UI:R requirements mean a working payload must defeat the previous fix and the victim must actually run the generated file.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 15, 2026

Code injection in protobufjs-cli pbjs static and static-module code generation allows attacker-influenced JSON descriptor names to be emitted as unsafe JavaScript references in generated output, leading to arbitrary code execution when the generated file is later imported and an affected API path is invoked. This affects npm protobufjs-cli versions <= 1.3.1 and 2.0.0 through 2.4.2, and is an incomplete-fix bypass of CVE-2026-44295 (GHSA-6r35-46g8-jcw9). At time of analysis, no public exploit identified and no CISA KEV listing, but vendor-released patches exist in 1.3.2 and 2.5.0.

RemediationAI

Vendor-released patch: upgrade protobufjs-cli to 1.3.2 on the 1.x line or 2.5.0 on the 2.x line, as published in GHSA-pr59-h9ph-3fr8 (https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-pr59-h9ph-3fr8) and mirrored at https://github.com/advisories/GHSA-pr59-h9ph-3fr8; teams that only patched against CVE-2026-44295 must upgrade again because this issue is a bypass of that fix. Where immediate upgrade is not possible, do not run pbjs static or static-module generation against untrusted pre-parsed JSON descriptors, and prefer feeding pbjs raw .proto files (the unaffected path) instead. If untrusted JSON descriptors must be accepted, validate every descriptor-derived name against the identifier grammar a real .proto parser would have produced and reject anything else, accepting that legitimate-but-unusual names may be blocked; additionally, run code generation inside an isolated environment (ephemeral container, unprivileged user, no network and no source-tree write access) so that any injected code that later executes is contained, recognizing this only reduces impact rather than preventing injection.

Affected VersionsENISA

protobufjs-cli 2.0.0, < 2.4.2
protobufjs-cli < 1.3.2

Affected Packages

npm protobufjs-cli fix: 1.3.2, 2.4.2, 2.5.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

protobufjs-cli ships the pbjs tool that converts Protocol Buffer schemas into static JavaScript modules. When pbjs operates in static or static-module mode, it walks a parsed descriptor tree and emits JavaScript identifiers (such as message, field, enum and service names) directly into the generated source. The root cause maps to CWE-94 (Improper Control of Generation of Code, i.e. code injection): descriptor-derived names taken from pre-parsed JSON input are interpolated into generated JS without sufficient validation that they could only have been produced by a legitimate .proto parser, allowing crafted names to escape identifier context and inject arbitrary JavaScript. The affected CPEs are pkg:npm/protobufjs-cli; the protobuf.js runtime library and the normal flow of parsing trusted .proto files are not implicated.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/protobufjs/protobuf.js) PRIMARY 8.2 HIGH
AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:L
vuln.today AI 8.2 HIGH

Attacker supplies JSON descriptor remotely (AV:N, PR:N) but must defeat the prior name-validation fix (AC:H) and a victim must build and import the generated file (UI:R), yielding cross-context code execution (S:C, C:H/I:H/A:L).

3.1 AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:L
4.0 AV:N/AC:H/AT:N/PR:N/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/protobufjs/protobuf.js).

CVSS VectorVendor: https://github.com/protobufjs/protobuf.js

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
Low

DescriptionCVE.org

Summary

A previous fix for unsafe name handling in pbjs static / static-module code generation was incomplete. Affected versions of protobufjs-cli could still emit unsafe JavaScript references when generating static output from crafted JSON descriptor input. The common case of parsing schemas from .proto files is not affected.

This is a bypass of GHSA-6r35-46g8-jcw9 / CVE-2026-44295.

Impact

An attacker who can provide or influence pre-parsed JSON descriptors passed to pbjs static code generation may be able to cause generated JavaScript output to contain attacker-controlled code.

The injected code may execute if the generated file is later executed or imported and an affected generated API path is invoked.

Preconditions

  • The application or build process must run pbjs static code generation on a pre-parsed JSON descriptor influenced by an attacker.
  • The generated JavaScript file must subsequently be executed or imported.
  • An affected generated API path must be invoked.

Workarounds

Do not run affected versions of pbjs static or static-module generation on untrusted JSON descriptors. If untrusted JSON descriptors must be accepted, validate descriptor-derived names before code generation and reject names that could not have been produced by parsing a valid .proto file. Running code generation in an isolated environment can reduce impact.

Executive ViewAI

Why It Matters

A code injection vulnerability in protobufjs-cli (npm package versions ≤1.3.1 and 2.0.0-2.4.2) enables attackers to inject arbitrary code into generated JavaScript files through manipulated protocol buffer descriptor names, resulting in arbitrary code execution when organizations deploy applications using the compromised generated code. No public exploit identified at time of analysis. This impacts all teams using affected versions of this build-time code generation tool, with risk spanning development environments through production deployments.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 85% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy