CVE-2026-55407
JSON

6.3medium

Buffa: Memory Exhaustion Denial of Service in decode_unknown_field via Unbounded Allocation

Severity
6.3medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.76% (higher than 51% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-f9qc-qg88-7pq5

Description

Buffa is a pure-Rust Protocol Buffers implementation with first-class protobuf editions support. Prior to 0.8.0, the decode_unknown_field function in buffa's protobuf decoder allocated heap memory in proportion to untrusted input (unknown fields in the serialized protobuf) without enforcing an allocation budget, affecting any message decoded from untrusted input using code generated with preserve_unknown_fields=true (the default); a small, well-formed payload of nested unknown fields inside a StartGroup could trigger roughly 22x memory amplification (for example a 64 MiB input forcing about 1.4 GB of heap allocation), and length-delimited unknown fields could be sized arbitrarily, so an unauthenticated attacker could crash a process through memory exhaustion because the top-level message size cap did not account for in-decode amplification. This issue is fixed in version 0.8.0.

Affected

Product or packageVersionsReported by
anthropics buffa< 0.8.0CVE List
buffa (crates.io)before 0.8.0GitHub Advisory Database

All scores

GitHub_M6.3medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Classification

CWE-400CWE-770CWE-789

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Buffa is a pure-Rust Protocol Buffers implementation with first-class protobuf editions support. Prior to 0.8.0, the decode_unknown_field function in buffa's protobuf decoder allocated heap memory in proportion to untrusted input (unknown fields in the serialized protobuf) without enforcing an allocation budget, affecting any message decoded from untrusted input using code generated with preserve_unknown_fields=true (the default); a small, well-formed payload of nested unknown fields inside a StartGroup could trigger roughly 22x memory amplification (for example a 64 MiB input forcing about 1.4 GB of heap allocation), and length-delimited unknown fields could be sized arbitrarily, so an unauthenticated attacker could crash a process through memory exhaustion because the top-level message size cap did not account for in-decode amplification. This issue is fixed in version 0.8.0.

GitHub Advisory Database

The decode_unknown_field function in buffa's protobuf decoder allocated heap memory in proportion to untrusted input (unknown fields in the serialized protobuf) without enforcing an allocation budget. Any message decoded from untrusted input using code generated with preserve_unknown_fields=true (the default) was affected. A small, well-formed payload of nested unknown fields inside a StartGroup could trigger roughly 22× memory amplification (e.g., a 64 MiB input forcing ~1.4 GB of heap allocation), and length-delimited unknown fields could be sized arbitrarily, enabling an unauthenticated attacker to crash a process via memory exhaustion. This was reachable from the default decode APIs, since the top-level message size cap did not account for in-decode amplification.

For users of connectrpc - the DEFAULT_MAX_MESSAGE_SIZE for connectrpc is 4MiB, which limits amplification in the worst case to ~88 MiB of memory. A flood of concurrent requests with this pattern could still be used to exhaust available memory, however.

Users are advised to either set preserve_unknown_fields=false on their current generated code, or upgrade to 0.8.0, which enforces per-message unknown field count limits - this is configurable, with a default of 1 million unknown fields, or ~40MiB of allocation overhead per message. Users are advised to update to the latest version, which enforces per-message unknown field count limits.

Thank you to @p80n-sec for reporting this issue.

NVD (es)

Buffa es una implementación pura en Rust de Protocol Buffers con soporte de primera clase para ediciones de protobuf. Antes de la versión 0.8.0, la función “decode_unknown_field” en el decodificador de protobuf de Buffa asignaba memoria del montón en proporción a la entrada no confiable (campos desconocidos en el protobuf serializado) sin aplicar un presupuesto de asignación, afectando cualquier mensaje decodificado de entrada no confiable usando código generado con “preserve_unknown_fields=true” (el valor predeterminado); una carga útil pequeña y bien formada de campos desconocidos anidados dentro de un “StartGroup” podría desencadenar aproximadamente una amplificación de memoria de 22x (por ejemplo, una entrada de 64 MiB forzando aproximadamente 1.4 GB de asignación de memoria del montón), y los campos desconocidos delimitados por longitud podrían tener un tamaño arbitrario, por lo que un atacante no autenticado podría bloquear un proceso por agotamiento de memoria porque el límite de tamaño del mensaje de nivel superior no tenía en cuenta la amplificación durante la decodificación. Este problema está solucionado en la versión 0.8.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-55407 changed 2026-07-16CVE Terms of Use
GitHub Advisory DatabaseGHSA-f9qc-qg88-7pq5 changed 2026-08-28CC-BY-4.0
NVDCVE-2026-55407 changed 2026-10-24Public domain