Rust advisories / libflate
Vulnerability CriticalRUSTSEC-2019-0010 · libflate
RUSTSEC-2019-0010: MultiDecoder::read() drops uninitialized memory of arbitrary type on panic in client code
Short answerA security vulnerability in the libflate crate: MultiDecoder::read() drops uninitialized memory of arbitrary type on panic in client code. Critical severity (CVSS 9.8). Fixed in 0.1.25: update to a fixed version.
| Crate | libflate |
|---|---|
| Type | Vulnerability |
| Affected versions | From 0.1.14 before 0.1.25. |
| Fixed in | 0.1.25 |
| Severity | Critical, CVSS 9.8 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| Published | 2019-07-04 |
| Last changed | 2023-11-08 |
| Also known as | CVE-2019-15552, GHSA-rpcm-whqc-jfw8 |
| Affected functions | libflate::gzip::MultiDecoder::read |
What to do
- See which version you have:
cargo tree -i libflate(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p libflate. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplelibflate = "0.1.25") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
Affected versions of libflate have set a field of an internal structure with a generic type to an uninitialized value in MultiDecoder::read() and reverted it to the original value after the function completed. However, execution of MultiDecoder::read() could be interrupted by a panic in caller-supplied Read implementation. This would cause drop() to be called on uninitialized memory of a generic type implementing Read.
This is equivalent to a use-after-free vulnerability and could allow an attacker to gain arbitrary code execution.
The flaw was corrected by aborting immediately instead of unwinding the stack in case of panic within MultiDecoder::read(). The issue was discovered and fixed by Shnatsel.
References
- Package: crates.io/crates/libflate
- Advisory: rustsec.org/advisories/RUSTSEC-2019-0010.html
- Report: github.com/sile/libflate/issues/35
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?