CVE-2026-54271: CWE-94: Improper Control of Generation of Code ('Code Injection') in protobufjs protobufjs-cli
protobufjs-cli is the command line add-on for protobuf.js. Prior to 1.3.2 and 2.5.0, 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 CVE-2026-44295. 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. This vulnerability is fixed in 1.3.2 and 2.5.0.
AI Analysis
Technical Summary
CVE-2026-54271 is a code injection vulnerability classified under CWE-94 in protobufjs-cli. The issue arises from incomplete fixes for unsafe name handling during static code generation, allowing an attacker who can supply or influence pre-parsed JSON descriptors to cause the tool to emit malicious JavaScript code. This malicious code may execute if the generated file is later run or imported and the vulnerable API path is triggered. The vulnerability specifically affects protobufjs-cli versions prior to 1.3.2 and 2.5.0. It does not impact the typical use case of parsing schemas from .proto files. This vulnerability bypasses a previous fix (CVE-2026-44295) and has been addressed in versions 1.3.2 and 2.5.0.
Potential Impact
Successful exploitation allows an attacker to inject and execute arbitrary JavaScript code via malicious JSON descriptors used in static code generation. This can lead to full compromise of the environment where the generated code is run or imported. The vulnerability does not affect parsing from .proto files, limiting the attack vector to scenarios where pre-parsed JSON descriptors are supplied or influenced by an attacker.
Mitigation Recommendations
This vulnerability is fixed in protobufjs-cli versions 1.3.2 and 2.5.0. Users should upgrade to at least one of these versions to remediate the issue. Since this is not a cloud service, remediation requires updating the affected software. Patch status is confirmed by the vendor advisory stating the fix in these versions.
CVE-2026-54271: CWE-94: Improper Control of Generation of Code ('Code Injection') in protobufjs protobufjs-cli
Description
protobufjs-cli is the command line add-on for protobuf.js. Prior to 1.3.2 and 2.5.0, 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 CVE-2026-44295. 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. This vulnerability is fixed in 1.3.2 and 2.5.0.
CVSS v3.1
Score 8.2high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-54271 is a code injection vulnerability classified under CWE-94 in protobufjs-cli. The issue arises from incomplete fixes for unsafe name handling during static code generation, allowing an attacker who can supply or influence pre-parsed JSON descriptors to cause the tool to emit malicious JavaScript code. This malicious code may execute if the generated file is later run or imported and the vulnerable API path is triggered. The vulnerability specifically affects protobufjs-cli versions prior to 1.3.2 and 2.5.0. It does not impact the typical use case of parsing schemas from .proto files. This vulnerability bypasses a previous fix (CVE-2026-44295) and has been addressed in versions 1.3.2 and 2.5.0.
Potential Impact
Successful exploitation allows an attacker to inject and execute arbitrary JavaScript code via malicious JSON descriptors used in static code generation. This can lead to full compromise of the environment where the generated code is run or imported. The vulnerability does not affect parsing from .proto files, limiting the attack vector to scenarios where pre-parsed JSON descriptors are supplied or influenced by an attacker.
Mitigation Recommendations
This vulnerability is fixed in protobufjs-cli versions 1.3.2 and 2.5.0. Users should upgrade to at least one of these versions to remediate the issue. Since this is not a cloud service, remediation requires updating the affected software. Patch status is confirmed by the vendor advisory stating the fix in these versions.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-12T17:13:32.280Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a39735beed863c81e39624f
Added to database: 06/22/2026, 17:39:39 UTC
Last enriched: 07/16/2026, 10:51:15 UTC
Last updated: 08/07/2026, 00:41:15 UTC
Views: 110
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.