CVE-2020-35864

7.5 HIGH

📋 TL;DR

This vulnerability in the Rust flatbuffers crate allows attackers to perform unsafe memory operations through safe-looking functions, potentially leading to memory corruption. It affects any Rust application using vulnerable versions of the flatbuffers crate for serialization/deserialization.

💻 Affected Systems

Products:
  • Rust applications using flatbuffers crate
Versions: flatbuffers crate versions through 0.6.1 (up to 2020-04-11)
Operating Systems: All platforms running Rust applications
Default Config Vulnerable: ⚠️ Yes
Notes: Any Rust application that deserializes untrusted flatbuffer data using read_scalar or read_scalar_at functions is vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution leading to complete system compromise through memory corruption attacks like buffer overflows or use-after-free.

🟠

Likely Case

Application crashes, denial of service, or data corruption due to invalid memory access.

🟢

If Mitigated

Limited impact if application runs with minimal privileges and proper memory safety controls.

🌐 Internet-Facing: MEDIUM - Exploitation requires attacker to supply malicious flatbuffer data to vulnerable parsing functions.
🏢 Internal Only: LOW - Requires attacker to have access to supply malicious data to internal systems.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: MEDIUM

Exploitation requires crafting malicious flatbuffer data that triggers unsafe memory operations during deserialization.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: flatbuffers crate version 0.6.2 and later

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

Restart Required: Yes

Instructions:

1. Update Cargo.toml to require flatbuffers >= 0.6.2
2. Run 'cargo update' to fetch new version
3. Rebuild and redeploy application
4. Restart affected services

🔧 Temporary Workarounds

Input Validation

all

Validate all flatbuffer input before processing with read_scalar functions

Sandbox Execution

all

Run vulnerable applications in containers or sandboxes with limited privileges

🧯 If You Can't Patch

  • Implement strict input validation for all flatbuffer data
  • Isolate vulnerable applications in network segments with limited access

🔍 How to Verify

Check if Vulnerable:

Check Cargo.lock or run 'cargo tree | grep flatbuffers' to see if version <= 0.6.1 is used

Check Version:

cargo tree | grep flatbuffers

Verify Fix Applied:

Verify flatbuffers version >= 0.6.2 in Cargo.lock after update

📡 Detection & Monitoring

Log Indicators:

  • Application crashes with memory access errors
  • Segmentation faults in Rust processes

Network Indicators:

  • Unusual flatbuffer data patterns in network traffic

SIEM Query:

process.name:rust AND (event.type:crash OR error.message:"memory" OR error.message:"segmentation")

🔗 References

📤 Share & Export