CVE-2022-0713

7.1 HIGH

📋 TL;DR

CVE-2022-0713 is a heap-based buffer overflow vulnerability in radare2 reverse engineering framework versions prior to 5.6.4. Attackers can exploit this by providing specially crafted input to cause memory corruption, potentially leading to arbitrary code execution. Users of radare2 for binary analysis or reverse engineering are affected.

💻 Affected Systems

Products:
  • radare2
Versions: All versions prior to 5.6.4
Operating Systems: Linux, Windows, macOS, BSD
Default Config Vulnerable: ⚠️ Yes
Notes: All installations of radare2 before the patched version are vulnerable when processing untrusted input.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote code execution with the privileges of the radare2 process, potentially leading to full system compromise if radare2 runs with elevated privileges.

🟠

Likely Case

Application crash (denial of service) or limited memory corruption leading to unstable behavior.

🟢

If Mitigated

Application crash without code execution if exploit fails or memory protections are in place.

🌐 Internet-Facing: LOW - radare2 is typically used as a local analysis tool, not as an internet-facing service.
🏢 Internal Only: MEDIUM - Could be exploited through malicious input files or network analysis of untrusted binaries within internal networks.

🎯 Exploit Status

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

Exploit requires crafting specific input to trigger the buffer overflow. The vulnerability was discovered through bounty hunting and has public technical details.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.6.4

Vendor Advisory: https://github.com/radareorg/radare2/commit/a35f89f86ed12161af09330e92e5a213014e46a1

Restart Required: No

Instructions:

1. Update radare2 to version 5.6.4 or later. 2. For package managers: 'sudo apt update && sudo apt upgrade radare2' (Debian/Ubuntu) or 'sudo yum update radare2' (RHEL/CentOS). 3. For source builds: git pull from repository and rebuild.

🔧 Temporary Workarounds

Input validation

all

Only use radare2 with trusted input files and binaries

Sandbox execution

linux

Run radare2 in a container or sandboxed environment

docker run --rm -v $(pwd):/work radareorg/radare2:latest

🧯 If You Can't Patch

  • Restrict radare2 usage to trusted users only
  • Implement strict file validation before processing with radare2

🔍 How to Verify

Check if Vulnerable:

Check radare2 version with 'r2 -v' and verify it's below 5.6.4

Check Version:

r2 -v | grep -i version

Verify Fix Applied:

Confirm version is 5.6.4 or higher with 'r2 -v'

📡 Detection & Monitoring

Log Indicators:

  • Radare2 process crashes with segmentation faults
  • Abnormal memory usage patterns in radare2 processes

Network Indicators:

  • Unusual network connections from radare2 processes if exploited

SIEM Query:

process_name:"r2" AND (event_type:"crash" OR memory_usage > threshold)

🔗 References

📤 Share & Export