CVE-2026-54270: protobufjs Memory Amplification From Preserved Unknown Vulnerability
MODERATECVE-2026-54270 is a MODERATE (CVSS 5.3) memory amplification from preserved unknown vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting protobufjs libraries in the npm ecosystem. The issue involves memory amplification from preserved unknown fields in binary decode. Remediation is available by upgrading affected packages to version 8.5.0.
CVE-2026-54270 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2026-54270
To remediate this vulnerability, upgrade all affected protobufjs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install protobufjs@8.5.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls protobufjs
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-54270, inspect your project dependencies using npm:
npm ls protobufjs
Analyze the terminal output to locate any version of protobufjs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.5.0), your application is affected.
Note: The npm ls protobufjs command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In protobufjs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-54270 Affected protobufjs Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
protobufjs
|
npm |
≥ 8.2.0
< 8.5.0
|
8.5.0
|
References
Frequently Asked Questions
What is CVE-2026-54270?
Which protobufjs versions are affected?
What version fixes CVE-2026-54270?
Is protobufjs affected?
What is the CVSS score of CVE-2026-54270?
What CWE is associated with CVE-2026-54270?
How can I check npm dependencies for CVE-2026-54270?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-94rc-8x27-4472",
"modified" : "2026-07-15T22:06:10Z",
"published" : "2026-06-15T20:13:28Z",
"aliases" : [ "CVE-2026-54270" ],
"summary" : "protobufjs: Memory amplification from preserved unknown fields in binary decode",
"details" : "## Summary\n\nprotobufjs 8.2.0 added support for preserving unknown fields encountered during binary decode. Affected versions preserved unknown wire elements in `message.$unknowns` and did not provide a decode-time option to discard unknown fields before retaining them.\n\nA 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.\n\n## Impact\n\nAn attacker who can provide protobuf binary data decoded by an application using affected protobufjs versions may be able to increase memory pressure by sending messages with many unknown fields. This can degrade availability or contribute to process termination in services that decode and retain attacker-controlled messages.\n\nThis issue affects applications that decode untrusted protobuf binary input and do not need unknown-field round-tripping. Applications that only decode trusted protobuf data, already enforce input-size/concurrency limits, or do not retain decoded messages beyond immediate processing are less directly affected.\n\n## Preconditions\n\n* The application must decode protobuf binary data influenced by an attacker.\n* The decoded schema must not define the attacker-selected field numbers, causing those fields to be treated as unknown.\n* The application must use a protobufjs version that preserves unknown fields but does not provide a decode-time discard option.\n* The decoded message, or enough decoded messages concurrently, must remain live long enough for retained unknown-field data to affect memory usage.\n\n## Workarounds\n\nUpgrade to protobufjs 8.5.0 or newer and disable unknown-field preservation if not needed: Create a `Reader`, set `reader.discardUnknown = true`, and decode from that reader, or make this the default for subsequently created readers by setting `Reader.discardUnknown = true`. When upgrading to protobufjs 8.6.2 or newer, unknown fields are discarded by default unless opted into by setting `discardUnknown = false`.\n\nApplications should also continue to enforce input-size, request concurrency, and request timeout limits at their transport or application boundary.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "protobufjs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.2.0"
}, {
"fixed" : "8.5.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 8.4.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-94rc-8x27-4472"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-54270"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/protobufjs/protobuf.js"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-15T20:13:28Z",
"nvd_published_at" : "2026-06-22T18:16:45Z"
}
}