CVE-2026-54270

protobufjs: Memory amplification from preserved unknown fields in binary decode

Published Jun 22, 2026 CVSS 3.1 · 5.3 Medium EPSS < 1% KEV · Not listed
Description
protobufjs compiles protobuf definitions into JavaScript (JS) functions. From 8.2.0 to 8.4.2, protobufjs preserved unknown wire elements in message.$unknowns and did not provide a decode-time option to discard unknown fields before retaining them. A crafted protobuf payload containing many unknown fields could therefore cause a decoded message to retain substantially more memory than the input size would suggest, even when unknown-field round-tripping is not needed. protobufjs 8.5.0 added the relevant decode-time options, allowing applications that decode untrusted protobuf data to disable unknown-field retention during decode. protobufjs 8.6.2 flips the default so unknown fields are discarded unless explicitly opted into.

Analysis

AI-generated

Technical impact

The vulnerability arises when protobuf.js retains unknown wire elements during decoding, allowing crafted protobuf messages to occupy far more memory than the original payload size. This memory amplification can degrade application performance or exhaust available memory, potentially leading to a denial‑of‑service condition. The weakness is a CWE‑770 memory allocation issue, where excessive memory is allocated for decoding without proper bounds enforcement.

Affected Systems

The affected product is protobuf.js, versions 8.2.0 through 8.4.2. These releases preserved unknown fields in the message.$unknowns structure and lacked an option to discard them at decode time. Starting with version 8.5.0 an option was added to control this behavior, and version 8.6.2 changed the default so that unknown fields are discarded unless explicitly opted into. Applications using vulnerable versions that process untrusted protobuf data are at risk.

Risk and Exploitability

The CVSS score of 5.3 indicates a moderate severity assessment. Because no EPSS score is available, the exploitation probability is not quantified, and the vulnerability is not listed in CISA's KEV catalog, the risk profile remains moderate but still relevant to any system that decodes externally supplied protobuf messages. The most likely attack vector involves an orchestrated delivery of a malicious protobuf payload to a service or library that uses protobuf.js to parse it; by flooding the decoder with numerous unknown fields the attacker can trigger excessive memory growth in the hosting process. The default setting in vulnerable releases causes the decoder to retain all unknown fields, amplifying memory usage across the application.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Replace protobuf.js with version 8.6.2 or later, which discards unknown fields by default.
  • If an immediate upgrade is not possible, explicitly configure the decode routine to discard unknown fields using the provided option (e.g., setting the discard flag during decoding).
  • Apply runtime limits or monitor decoded payload sizes and reject messages that exceed acceptable thresholds to protect against abnormal memory consumption.

Generated by OpenCVE AI on June 22, 2026 at 18:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-94rc-8x27-4472 protobufjs: Memory amplification from preserved unknown fields in binary decode
History
Type Values Removed Values Added
First Time appeared Protobuf
Protobuf protobuf
Vendors & Products Protobuf
Protobuf protobuf
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description protobufjs compiles protobuf definitions into JavaScript (JS) functions. From 8.2.0 to 8.4.2, protobufjs preserved unknown wire elements in message.$unknowns and did not provide a decode-time option to discard unknown fields before retaining them. A crafted protobuf payload containing many unknown fields could therefore cause a decoded message to retain substantially more memory than the input size would suggest, even when unknown-field round-tripping is not needed. protobufjs 8.5.0 added the relevant decode-time options, allowing applications that decode untrusted protobuf data to disable unknown-field retention during decode. protobufjs 8.6.2 flips the default so unknown fields are discarded unless explicitly opted into.
Title protobufjs: Memory amplification from preserved unknown fields in binary decode
Weaknesses CWE-770
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

Weaknesses
  • CWE-770

    Allocation of Resources Without Limits or Throttling

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jun 23, 2026, 4:09 PM
Reserved
Jun 12, 2026, 5:13 PM
Status
Analyzed
Published
Jun 22, 2026, 6:16 PM
Modified
Oct 25, 2026, 11:10 PM
Severity
Low
Public date
Jun 22, 2026, 4:19 PM