CVE-2021-45692
Description
An issue was discovered in the messagepack-rs crate through 2021-01-26 for Rust. deserialize_extension_others may read from uninitialized memory locations.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
messagepack-rs crate passes uninitialized memory to user-provided Read trait, potentially exposing sensitive data.
Vulnerability
The messagepack-rs crate (all versions up to and including 2021-01-26) contains a vulnerability in several deserialization functions. The functions deserialize_extension_others, deserialize_binary, deserialize_string, and deserialize_unknown pass uninitialized memory to a user-provided Read implementation. This occurs because they use unsafe { buf.set_len(size); } to set the length of a Vec without first initializing the buffer, then read into that uninitialized memory. This can lead to reading from uninitialized memory locations [1][2][3].
Exploitation
An attacker who can control the data passed to a Read implementation used by these deserialization functions can trigger the vulnerability. The attacker does not need special privileges; any code that deserializes untrusted data using the vulnerable functions may be affected. The exploit requires that the attacker craft a malicious input that, when deserialized, causes the affected functions to read from uninitialized memory [2][3].
Impact
Successful exploitation can lead to exposure of uninitialized memory, which may contain sensitive information. This is a memory-exposure vulnerability that violates Rust's memory safety guarantees. The impact could include information disclosure (e.g., leaking secrets or sensitive data) and potentially undefined behavior [3].
Mitigation
As of the latest advisory (June 2023), there are no patched versions of the messagepack-rs crate [3]. The repository [4] shows no fix has been released. Users should avoid using this crate for processing untrusted data until a fix is available, or switch to an alternative MessagePack implementation.
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
messagepack-rscrates.io | <= 0.8.1 | — |
Affected products
2- messagepack-rs/messagepack-rsdescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-hr52-f9vp-582cghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2021-45692ghsaADVISORY
- github.com/otake84/messagepack-rs/issues/2ghsaWEB
- raw.githubusercontent.com/rustsec/advisory-db/main/crates/messagepack-rs/RUSTSEC-2021-0092.mdghsax_refsource_MISCWEB
- rustsec.org/advisories/RUSTSEC-2021-0092.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.