CVE-2020-35883
📋 TL;DR
This vulnerability in the mozwire Rust crate allows attackers to perform directory traversal attacks, enabling them to overwrite local configuration files ending with .conf. Any Rust application using the vulnerable mozwire crate versions is affected, potentially allowing file system manipulation.
💻 Affected Systems
- mozwire Rust crate
📦 What is this software?
Mozwire by Mozwire Project
⚠️ Risk & Real-World Impact
Worst Case
Complete system compromise through overwriting critical configuration files, potentially leading to privilege escalation, service disruption, or remote code execution.
Likely Case
Local file corruption or unauthorized modification of application configuration files, causing service disruption or data integrity issues.
If Mitigated
Limited impact with proper file permission controls and sandboxing, potentially only affecting non-critical configuration files.
🎯 Exploit Status
Exploitation requires the ability to influence file paths processed by the vulnerable crate functions. No public exploit code has been documented.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Versions after 2020-08-18
Vendor Advisory: https://rustsec.org/advisories/RUSTSEC-2020-0030.html
Restart Required: Yes
Instructions:
1. Update Cargo.toml to use mozwire version > 0.1.0 (post 2020-08-18). 2. Run 'cargo update mozwire'. 3. Rebuild and redeploy your application. 4. Restart affected services.
🔧 Temporary Workarounds
Input validation and sanitization
allImplement strict input validation to reject any file paths containing directory traversal sequences like '../'
Implement custom validation logic in your application code
File permission restrictions
linuxSet strict file permissions on .conf files to prevent unauthorized writes
chmod 644 *.conf
chown root:root *.conf
🧯 If You Can't Patch
- Implement application-level input validation to sanitize all file path inputs
- Use file system monitoring to detect unauthorized modifications to .conf files
🔍 How to Verify
Check if Vulnerable:
Check Cargo.lock or Cargo.toml for mozwire dependency version. If version is <= 0.1.0 (from 2020-08-18 or earlier), the application is vulnerable.
Check Version:
grep -A2 -B2 mozwire Cargo.lock || grep mozwire Cargo.toml
Verify Fix Applied:
Verify mozwire version in Cargo.lock is > 0.1.0 and the build date is after 2020-08-18.
📡 Detection & Monitoring
Log Indicators:
- Unexpected file write operations to .conf files
- File path inputs containing '../' sequences
- Failed file permission errors on configuration files
Network Indicators:
- Unusual network patterns if exploit leads to further compromise
SIEM Query:
source="application.log" AND ("../" OR "directory traversal" OR "conf file modified")