Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.3%top 77%

CVE-2026-54271: CWE-94: Improper Control of Generation of Code ('Code Injection') in protobufjs protobufjs-cli

0
High
VulnerabilityCVE-2026-54271cvecve-2026-54271cwe-94
Published: 06/22/2026 (06/22/2026, 16:16:05 UTC)
Source: CVE Database V5
Vendor/Project: protobufjs
Product: 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

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
Low
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:L

Affected software

protobufjs-cli
pkg:npm/protobufjs-cli
Affected versions
<1.3.2<2.5.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/16/2026, 10:51:15 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses