CVE-2026-44295: Protobufjs cli Code Injection Vulnerability
HIGHCVE-2026-44295 is a HIGH (CVSS 8.7) code injection vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Protobufjs cli libraries in the npm ecosystem. The issue involves code injection in pbjs static output from crafted schema names. Remediation is available by upgrading affected packages to version 1.2.1, 2.0.2.
CVE-2026-44295 at a Glance
Security Impact
CVSS: 8.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N).
How to Fix CVE-2026-44295
To remediate this vulnerability, upgrade all affected Protobufjs cli dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install protobufjs-cli@1.2.1
npm install protobufjs-cli@2.0.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls protobufjs-cli
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-44295, inspect your project dependencies using npm:
npm ls protobufjs-cli
Analyze the terminal output to locate any version of Protobufjs cli in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.1), your application is affected.
Note: The npm ls protobufjs-cli command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Protobufjs cli, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-44295 Affected Protobufjs cli Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
protobufjs-cli
|
npm |
< 1.2.1
|
1.2.1
|
|
protobufjs-cli
|
npm |
≥ 2.0.0
< 2.0.2
|
2.0.2
|
References
Frequently Asked Questions
What is CVE-2026-44295?
Which Protobufjs cli versions are affected?
What version fixes CVE-2026-44295?
Is protobufjs-cli affected?
What is the CVSS score of CVE-2026-44295?
What CWE is associated with CVE-2026-44295?
How can I check npm dependencies for CVE-2026-44295?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6r35-46g8-jcw9",
"modified" : "2026-05-14T20:35:26Z",
"published" : "2026-05-12T15:06:22Z",
"aliases" : [ "CVE-2026-44295" ],
"summary" : "protobuf.js: Code injection in pbjs static output from crafted schema names",
"details" : "## Summary\n\n`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.\n\n## Impact\n\nAn 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.\n\nThis 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.\n\n## Preconditions\n\n- The application or build process must run `pbjs` static code generation on a schema or JSON descriptor influenced by an attacker.\n- The attacker-controlled input must contain crafted schema names that reach generated JavaScript output.\n- The generated JavaScript file must subsequently be executed, imported, or otherwise evaluated.\n\n## Workarounds\n\nDo 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "protobufjs-cli"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.2.0"
}
}, {
"package" : {
"ecosystem" : "npm",
"name" : "protobufjs-cli"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.0.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.0.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-6r35-46g8-jcw9"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-44295"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/protobufjs/protobuf.js"
}, {
"type" : "WEB",
"url" : "https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-cli-v1.2.1"
}, {
"type" : "WEB",
"url" : "https://github.com/protobufjs/protobuf.js/releases/tag/protobufjs-cli-v2.0.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-12T15:06:22Z",
"nvd_published_at" : "2026-05-13T16:16:56Z"
}
}