CVE-2021-25904

7.5 HIGH

📋 TL;DR

This vulnerability in the av-data Rust crate allows dereferencing of raw pointers, potentially reading arbitrary memory addresses. This can cause segmentation faults or expose sensitive memory contents. Any Rust application using av-data versions before 0.3.0 is affected.

💻 Affected Systems

Products:
  • av-data Rust crate
Versions: All versions before 0.3.0
Operating Systems: All operating systems running Rust applications
Default Config Vulnerable: ⚠️ Yes
Notes: Any Rust application that imports and uses the vulnerable av-data crate is affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Arbitrary memory read could expose sensitive data like encryption keys, credentials, or application secrets, potentially leading to full system compromise.

🟠

Likely Case

Application crashes (segfaults) causing denial of service and potential information disclosure through memory dumps.

🟢

If Mitigated

With proper memory protection and ASLR, impact limited to application crashes without data exposure.

🌐 Internet-Facing: MEDIUM - Requires specific conditions to trigger, but internet-facing services could be crashed or have memory contents exposed.
🏢 Internal Only: LOW - Internal applications less likely to be targeted, but still vulnerable to crashes.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires triggering specific code paths that dereference the raw pointer. No public exploit code has been documented.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.3.0 and later

Vendor Advisory: https://rustsec.org/advisories/RUSTSEC-2021-0007.html

Restart Required: Yes

Instructions:

1. Update Cargo.toml to specify av-data >= 0.3.0
2. Run 'cargo update' to fetch the patched version
3. Rebuild and redeploy your application
4. Restart any running services using the updated application

🔧 Temporary Workarounds

Remove av-data dependency

all

If av-data is not essential, remove it from your Cargo.toml and refactor code to eliminate its usage.

Remove 'av-data' line from Cargo.toml dependencies
Run 'cargo build' to verify removal

🧯 If You Can't Patch

  • Isolate affected applications in containers or VMs with minimal privileges
  • Implement strict network controls to limit access to vulnerable services

🔍 How to Verify

Check if Vulnerable:

Check Cargo.lock or run 'cargo tree | grep av-data' to see if av-data < 0.3.0 is in your dependency tree.

Check Version:

cargo tree | grep av-data

Verify Fix Applied:

Run 'cargo tree | grep av-data' and verify version is 0.3.0 or higher, then test application functionality.

📡 Detection & Monitoring

Log Indicators:

  • Segmentation fault errors
  • Application crashes with memory access violations
  • Unexpected termination of Rust processes

Network Indicators:

  • Sudden service unavailability
  • Connection resets from affected services

SIEM Query:

process.name: "your_rust_app" AND (event.action: "segmentation_fault" OR event.outcome: "failure")

🔗 References

📤 Share & Export