CVE-2026-54271 protobufjs-cli: Code injection in pbjs static output from crafted JSON descriptor names

High 8.2 Published Updated

Attackers can inject malicious code into generated JavaScript files via crafted JSON descriptors, leading to execution when the output is used.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-54271?

CVE-2026-54271 is a high-severity code injection vulnerability in protobufjs-cli, published on 22 Jun 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-94

Which versions are affected by CVE-2026-54271?

4 open source packages ship an affected version, including protobufjs-cli. It affects 1 product.

PackageAffectedFixed in
protobufjs-cli npmAll versions1.3.2
protobufjs-cli npmAll versions1.3.2
protobufjs-cli npmFrom 2.0.02.5.0
protobufjs-cli npmFrom 2.0.02.5.0

Products include Protobufjs Project Protobufjs-Cli.

How do I fix CVE-2026-54271?

Upgrade protobufjs-cli to a fixed version for your release line: 1.3.2 or 2.5.0.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-54271 being exploited?

There is no known exploitation of CVE-2026-54271 in the wild and no public exploit code.

Sources

Also known as CLEANSTART-2026-QX07300, GHSA-pr59-h9ph-3fr8.

Is CVE-2026-54271 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free