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.
Published: 2026-06-22
Score: 5.3 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

Mon, 22 Jun 2026 17:30:00 +0000

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'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-22T16:19:20.449Z

Reserved: 2026-06-12T17:13:32.279Z

Link: CVE-2026-54270

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-22T18:30:15Z

Weaknesses
  • CWE-770

    Allocation of Resources Without Limits or Throttling