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…

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

CVE-2026-54271 is a high-severity code injection vulnerability in protobufjs-cli, a command line add-on for protobuf.js. Versions prior to 1.3.2 and 2.5.0 contain an incomplete fix for unsafe name handling in static code generation, allowing crafted JSON descriptor input to produce unsafe JavaScript references. This vulnerability does not affect the common case of parsing schemas from .proto files. An attacker able to influence pre-parsed JSON descriptors used in static code generation could inject attacker-controlled code that executes when the generated JavaScript file is run or imported. The issue is a bypass of a previous vulnerability CVE-2026-44295 and is fixed in versions 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: 06/22/2026, 17:54:24 UTC

Technical Analysis

protobufjs-cli versions before 1.3.2 and 2.5.0 have an incomplete fix for unsafe name handling in static code generation from JSON descriptors, allowing code injection. This vulnerability arises when attacker-controlled JSON descriptors are used to generate static JavaScript output, potentially resulting in injected code execution upon use of the generated API. The vulnerability bypasses a prior fix (CVE-2026-44295) and does not affect the typical use case of parsing .proto files. The vulnerability is identified as CWE-94 (Improper Control of Generation of Code).

Potential Impact

An attacker who can supply or influence pre-parsed JSON descriptors passed to the static code generation feature of protobufjs-cli may cause malicious JavaScript code to be injected into the generated output. This injected code could execute when the generated file is executed or imported and the affected API path is invoked, potentially leading to full compromise of the environment running the generated code. The vulnerability has a CVSS 3.1 score of 8.2, indicating high impact on confidentiality and integrity with limited availability impact.

Mitigation Recommendations

This vulnerability is fixed in protobufjs-cli versions 1.3.2 and 2.5.0. Users should upgrade to one of these versions or later to remediate the issue. Since no official remediation level or patch links are provided in the advisory, users should verify the upgrade availability from the official protobufjs project sources. Avoid using untrusted or attacker-controlled JSON descriptors as input to the static code generation feature. The common use case of parsing .proto files is not affected, so prefer this method where possible.

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: 06/22/2026, 17:54:24 UTC

Last updated: 06/23/2026, 00:49:09 UTC

Views: 9

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