CVE-2020-35885

9.8 CRITICAL

📋 TL;DR

This vulnerability in the alpm-rs Rust crate allows double-free memory corruption due to improper deallocation in StrcCtx. Attackers can exploit this to execute arbitrary code or cause denial of service. Any Rust application using vulnerable versions of alpm-rs is affected.

💻 Affected Systems

Products:
  • alpm-rs Rust crate
Versions: All versions through 2020-08-20
Operating Systems: All operating systems running Rust applications with alpm-rs
Default Config Vulnerable: ⚠️ Yes
Notes: Any Rust application that imports and uses the vulnerable alpm-rs crate is affected regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise, data theft, or ransomware deployment.

🟠

Likely Case

Application crash or denial of service, potentially allowing privilege escalation in multi-user environments.

🟢

If Mitigated

Controlled crash with minimal impact if proper memory isolation and privilege separation are implemented.

🌐 Internet-Facing: HIGH - Memory corruption vulnerabilities can be exploited remotely if the application processes untrusted input.
🏢 Internal Only: MEDIUM - Still significant risk from internal threats or compromised internal systems.

🎯 Exploit Status

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

Memory corruption vulnerabilities typically require specific conditions to trigger but can be exploited without authentication if the application processes external input.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Versions after 2020-08-20

Vendor Advisory: https://rustsec.org/advisories/RUSTSEC-2020-0032.html

Restart Required: Yes

Instructions:

1. Update Cargo.toml to use alpm-rs version > 0.8.0. 2. Run 'cargo update'. 3. Rebuild and redeploy your application. 4. Restart affected services.

🔧 Temporary Workarounds

Remove alpm-rs dependency

all

Temporarily remove or replace the alpm-rs crate with alternative functionality

cargo remove alpm-rs

🧯 If You Can't Patch

  • Isolate affected applications in containers or VMs with minimal privileges
  • Implement network segmentation to limit attack surface and monitor for exploitation attempts

🔍 How to Verify

Check if Vulnerable:

Check Cargo.lock for alpm-rs version <= 0.8.0 or run 'cargo audit'

Check Version:

grep -A2 'name = "alpm-rs"' Cargo.lock

Verify Fix Applied:

Verify Cargo.lock shows alpm-rs version > 0.8.0 and 'cargo audit' reports no vulnerabilities

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with segmentation faults
  • Memory allocation errors
  • Unexpected process termination

Network Indicators:

  • Unusual outbound connections from Rust applications
  • Exploit kit traffic patterns

SIEM Query:

process_name:rust AND (event_type:crash OR memory_violation)

🔗 References

📤 Share & Export