CVE-2022-0559

9.8 CRITICAL

📋 TL;DR

This is a use-after-free vulnerability in radare2, a popular reverse engineering framework. Attackers can exploit this to execute arbitrary code or cause denial of service by manipulating freed memory. Anyone using radare2 versions prior to 5.6.2 is affected.

💻 Affected Systems

Products:
  • radare2
Versions: All versions prior to 5.6.2
Operating Systems: Linux, Windows, macOS, BSD
Default Config Vulnerable: ⚠️ Yes
Notes: All installations using vulnerable versions are affected regardless of configuration.

📦 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.

🟠

Likely Case

Application crash (denial of service) or limited code execution within the radare2 process context.

🟢

If Mitigated

Application crash with no further impact if proper sandboxing/privilege separation is implemented.

🌐 Internet-Facing: MEDIUM - radare2 is primarily a local analysis tool, but could be exposed through web interfaces or remote services.
🏢 Internal Only: HIGH - Attackers with access to feed malicious files to radare2 can exploit this vulnerability locally.

🎯 Exploit Status

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

Exploitation requires feeding specially crafted input to radare2, which could be automated.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 5.6.2 and later

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

Restart Required: No

Instructions:

1. Update radare2 to version 5.6.2 or later using your package manager or from source. 2. For package managers: 'sudo apt update && sudo apt upgrade radare2' (Debian/Ubuntu) or 'sudo yum update radare2' (RHEL/CentOS). 3. For source: git clone, checkout latest tag, build and install.

🔧 Temporary Workarounds

Restrict file processing

all

Limit radare2 to trusted input sources only

Run with reduced privileges

linux

Execute radare2 with minimal user permissions

sudo -u nobody radare2 [file]

🧯 If You Can't Patch

  • Isolate radare2 in a container or VM with no network access
  • Implement strict input validation and only process trusted files

🔍 How to Verify

Check if Vulnerable:

Run 'r2 -v' and check if version is below 5.6.2

Check Version:

r2 -v | head -1

Verify Fix Applied:

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

📡 Detection & Monitoring

Log Indicators:

  • Segmentation faults in radare2 process
  • Unexpected memory access errors

Network Indicators:

  • Unusual network connections from radare2 process

SIEM Query:

process_name:"radare2" AND (event_type:"crash" OR event_type:"segfault")

🔗 References

📤 Share & Export