CVE-2020-35868

9.8 CRITICAL

📋 TL;DR

This vulnerability in the rusqlite Rust crate before version 0.23.0 allows memory safety violations through the UnlockNotification feature. Attackers could potentially execute arbitrary code or cause denial of service. Any Rust application using vulnerable versions of rusqlite is affected.

💻 Affected Systems

Products:
  • rusqlite Rust crate
Versions: All versions before 0.23.0
Operating Systems: All platforms supported by Rust
Default Config Vulnerable: ⚠️ Yes
Notes: Any Rust application using rusqlite with UnlockNotification feature enabled

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise

🟠

Likely Case

Application crash or denial of service

🟢

If Mitigated

Limited impact with proper sandboxing and privilege separation

🌐 Internet-Facing: HIGH - Memory safety violations can be exploited remotely
🏢 Internal Only: HIGH - Memory corruption vulnerabilities affect all deployments

🎯 Exploit Status

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

Memory safety violations typically require specific conditions to exploit

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.23.0 and later

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

Restart Required: Yes

Instructions:

1. Update Cargo.toml to require rusqlite >= 0.23.0
2. Run 'cargo update rusqlite'
3. Rebuild and redeploy your application

🔧 Temporary Workarounds

Disable UnlockNotification

all

Disable the vulnerable UnlockNotification feature if not required

In Cargo.toml: rusqlite = { version = "<0.23.0", default-features = false, features = ["bundled"] }

🧯 If You Can't Patch

  • Isolate vulnerable applications in containers with minimal privileges
  • Implement network segmentation to limit attack surface

🔍 How to Verify

Check if Vulnerable:

Check Cargo.lock for rusqlite version < 0.23.0

Check Version:

grep -A2 'name = "rusqlite"' Cargo.lock

Verify Fix Applied:

Verify rusqlite >= 0.23.0 appears in Cargo.lock after update

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with memory corruption errors
  • Unexpected process termination

Network Indicators:

  • Unusual database connection patterns

SIEM Query:

process.name:your_app AND (event.type:crash OR error.message:"memory corruption")

🔗 References

📤 Share & Export