{"id":"CVE-2026-54270","aliases":["CVE-2026-54270","GHSA-94rc-8x27-4472"],"related":[],"kind":"vulnerability","state":"published","title":"protobufjs: Memory amplification from preserved unknown fields in binary decode","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"protobufjs compila definiciones de protobuf en funciones de JavaScript (JS). Desde la versión 8.2.0 hasta la 8.4.2, protobufjs conservaba elementos de cable desconocidos en message.$unknowns y no proporcionaba una opción en tiempo de decodificación para descartar campos desconocidos antes de retenerlos. Una carga útil de protobuf manipulada que contenía muchos campos desconocidos podría, por lo tanto, causar que un mensaje decodificado retuviera sustancialmente más memoria de lo que sugeriría el tamaño de entrada, incluso cuando no es necesario el viaje de ida y vuelta de campos desconocidos. protobufjs 8.5.0 añadió las opciones relevantes en tiempo de decodificación, permitiendo que las aplicaciones que decodifican datos protobuf no confiables deshabiliten la retención de campos desconocidos durante la decodificación. protobufjs 8.6.2 invierte el valor predeterminado de modo que los campos desconocidos se descartan a menos que se opte explícitamente por ellos.","source":"nvd"}],"published":"2026-06-15T20:13:28.000Z","modified":"2026-10-25T23:10:00.167Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-770"],"affected":[{"ranges":[{"version":">=8.2.0, < 8.5.0","status":"affected"}],"vendor":"protobufjs","product":"protobuf.js","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"8.2.0","status":"affected","fixed":"8.5.0"}],"ecosystem":"npm","package":"protobufjs","purl":"pkg:npm/protobufjs","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"8.2.0","fixed":"8.5.0"}],"vendor":"protobufjs_project","product":"protobufjs","cpe":"cpe:2.3:a:protobufjs_project:protobufjs:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/protobufjs/protobuf.js/security/advisories/GHSA-94rc-8x27-4472","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54270","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/protobufjs/protobuf.js","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-06-23T14:47:41.353Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-54270","url":"https://www.cve.org/CVERecord?id=CVE-2026-54270","licence":"CVE Terms of Use","modified":"2026-06-23T16:09:51.638Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-94rc-8x27-4472","url":"https://github.com/advisories/GHSA-94rc-8x27-4472","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:49.087Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-54270","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54270","licence":"Public domain","modified":"2026-10-25T23:10:00.167Z"}],"updatedAt":"2026-11-25T22:59:25.392Z","epss":{"score":0.00293,"percentile":0.23559,"date":"2026-12-01T12:00:22.000Z"}}