CVE-2026-55406
JSON

5.9medium

Buffa: Use-After-Free in OwnedView via Unsound 'static Lifetime Promotion in Deref

Severity
5.9medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.16% (higher than 4% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-9pwq-gcrx-wghh

Description

Buffa is a pure-Rust Protocol Buffers implementation with first-class protobuf editions support. Prior to 0.7.0, a soundness bug in the OwnedView<V> type allowed safe Rust code to trigger a use-after-free: the OwnedView::decode constructor transmuted a borrowed slice to &'static [u8], and the Deref implementation exposed the promoted 'static lifetime on borrowed view fields (such as &'static str and &'static [u8]) to callers, so the borrow checker permitted those references to outlive the OwnedView; once the OwnedView was dropped and its backing buffer freed, the references became dangling, enabling memory corruption, information disclosure of freed heap contents, and cross-thread misuse without any unsafe code in the calling application. This issue is fixed in version 0.7.0.

Affected

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

All scores

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

Classification

CWE-200CWE-416

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.7.0, a soundness bug in the OwnedView<V> type allowed safe Rust code to trigger a use-after-free: the OwnedView::decode constructor transmuted a borrowed slice to &'static [u8], and the Deref implementation exposed the promoted 'static lifetime on borrowed view fields (such as &'static str and &'static [u8]) to callers, so the borrow checker permitted those references to outlive the OwnedView; once the OwnedView was dropped and its backing buffer freed, the references became dangling, enabling memory corruption, information disclosure of freed heap contents, and cross-thread misuse without any unsafe code in the calling application. This issue is fixed in version 0.7.0.

GitHub Advisory Database

A soundness bug in buffa's OwnedView<V> allowed safe Rust code to trigger a use-after-free. The OwnedView::decode constructor transmuted a borrowed slice to &'static [u8], and the Deref implementation exposed the promoted 'static lifetime on borrowed view fields (such as &'static str and &'static [u8]) to callers. Because these references appeared to be 'static, the borrow checker permitted them to outlive the OwnedView; once the OwnedView was dropped and its backing buffer freed, those references became dangling, enabling memory corruption, information disclosure of freed heap contents, and cross-thread misuse — all without any unsafe code in the calling application. Users are advised to update to the latest patched version of buffa.

Thank you to hackerone.com/suul for reporting this issue.

NVD (es)

Buffa es una implementación puramente en Rust de Protocol Buffers con soporte de primera clase para ediciones de protobuf. Antes de la versión 0.7.0, un error de solidez en el tipo OwnedView[V] permitía que código Rust seguro desencadenara un uso después de liberación: el constructor OwnedView::decode transmutaba un ’slice’ prestado a &’static [u8], y la implementación de Deref exponía la vida útil ’static promovida en campos de vista prestados (como &’static str y &’static [u8]) a los llamadores, por lo que el verificador de préstamos permitía que esas referencias sobrevivieran al OwnedView; una vez que el OwnedView era descartado y su búfer de respaldo liberado, las referencias quedaban colgantes, lo que permitía la corrupción de memoria, la revelación de información del contenido de la memoria ’heap’ liberada y el uso indebido entre hilos sin ningún código inseguro en la aplicación llamadora. Este problema está solucionado en la versión 0.7.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-55406 changed 2026-07-16CVE Terms of Use
GitHub Advisory DatabaseGHSA-9pwq-gcrx-wghh changed 2026-08-28CC-BY-4.0
NVDCVE-2026-55406 changed 2026-10-24Public domain