CVE-2021-45690
📋 TL;DR
This vulnerability in the messagepack-rs Rust crate allows attackers to read uninitialized memory during binary deserialization. This can lead to information disclosure, memory corruption, or potential remote code execution. Any Rust application using vulnerable versions of messagepack-rs for deserializing untrusted data is affected.
💻 Affected Systems
- messagepack-rs Rust crate
📦 What is this software?
Messagepack Rs by Messagepack Rs Project
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution leading to complete system compromise, data theft, or service disruption.
Likely Case
Information disclosure through memory leaks, potentially exposing sensitive data like encryption keys or credentials.
If Mitigated
Limited impact if only trusted data sources are used and proper input validation is implemented.
🎯 Exploit Status
Exploitation requires sending specially crafted binary data to the deserialization function. The advisory includes proof-of-concept details.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Update to messagepack-rs 0.8.1 or later
Vendor Advisory: https://rustsec.org/advisories/RUSTSEC-2021-0092.html
Restart Required: Yes
Instructions:
1. Update Cargo.toml to require messagepack-rs >= 0.8.1
2. Run 'cargo update messagepack-rs'
3. Rebuild and redeploy your application
4. Restart affected services
🔧 Temporary Workarounds
Disable binary deserialization
allAvoid using deserialize_binary function with untrusted data
Input validation
allImplement strict validation of incoming serialized data before processing
🧯 If You Can't Patch
- Implement network segmentation to isolate vulnerable services
- Deploy Web Application Firewall (WAF) rules to block suspicious serialized data patterns
🔍 How to Verify
Check if Vulnerable:
Check Cargo.lock or Cargo.toml for messagepack-rs version <= 0.8.0
Check Version:
grep messagepack-rs Cargo.lock | grep version
Verify Fix Applied:
Verify messagepack-rs version >= 0.8.1 in Cargo.lock after update
📡 Detection & Monitoring
Log Indicators:
- Memory access violations
- Unexpected process crashes during deserialization
- Abnormal memory usage patterns
Network Indicators:
- Unusual binary data patterns in network traffic to deserialization endpoints
SIEM Query:
process:crash AND (messagepack OR deserialize_binary) OR memory:violation AND application:rust
🔗 References
- https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/messagepack-rs/RUSTSEC-2021-0092.md
- https://rustsec.org/advisories/RUSTSEC-2021-0092.html
- https://raw.githubusercontent.com/rustsec/advisory-db/main/crates/messagepack-rs/RUSTSEC-2021-0092.md
- https://rustsec.org/advisories/RUSTSEC-2021-0092.html