CVE-2020-35909
📋 TL;DR
This vulnerability in the multihash Rust crate allows remote attackers to cause denial of service by sending specially crafted data that triggers a panic in the parsing code. Any Rust application using the vulnerable multihash crate to parse untrusted network data is affected.
💻 Affected Systems
- multihash Rust crate
📦 What is this software?
Multihash by Protocol
⚠️ Risk & Real-World Impact
Worst Case
Remote unauthenticated attacker causes application crash/panic leading to denial of service, potentially disrupting critical services.
Likely Case
Application crashes when processing malformed multihash data from untrusted sources, causing service disruption.
If Mitigated
With input validation and proper error handling, the impact is limited to rejected requests rather than crashes.
🎯 Exploit Status
Exploitation requires sending malformed multihash data to trigger panic, which is straightforward for denial of service.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.11.3
Vendor Advisory: https://rustsec.org/advisories/RUSTSEC-2020-0068.html
Restart Required: Yes
Instructions:
1. Update Cargo.toml to specify multihash = "^0.11.3"
2. Run 'cargo update' to fetch the patched version
3. Rebuild and redeploy your application
4. Restart affected services
🔧 Temporary Workarounds
Input validation wrapper
allWrap multihash parsing with custom validation to reject malformed data before passing to from_slice
// Rust code example: Validate data length and structure before parsing
🧯 If You Can't Patch
- Implement network-level filtering to block or sanitize multihash data from untrusted sources
- Deploy application behind reverse proxy with request validation and rate limiting
🔍 How to Verify
Check if Vulnerable:
Check Cargo.lock or run 'cargo tree | grep multihash' to see if version <0.11.3 is used
Check Version:
grep -A2 -B2 multihash Cargo.lock || cargo tree | grep multihash
Verify Fix Applied:
Confirm multihash version is 0.11.3+ in Cargo.lock and test with malformed multihash data
📡 Detection & Monitoring
Log Indicators:
- Application panic logs mentioning multihash::from_slice
- Unexpected service restarts after processing network data
Network Indicators:
- Spike in malformed data packets to services using multihash parsing
SIEM Query:
source="application.logs" AND ("panic" OR "thread.*panicked") AND "multihash"