CVE-2022-1240

Heap buffer overflow in libr/bin/format/mach0/mach0.c in radareorg/radare2

HIGH
7.8
CVSS Score
Published: April 6, 2022 at 10:15 AM UTC
Updated: June 17, 2026 at 04:22 AM UTC
2 products affected across 2 vendorsRADARE2RADARE2

Using radareorg/radare2 by radareorg?

Get instant alerts when new vulnerabilities affect radareorg/radare2 - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.7%

Description

Heap buffer overflow in libr/bin/format/mach0/mach0.c in GitHub repository radareorg/radare2 prior to 5.8.6. If address sanitizer is disabled during the compiling, the program should executes into the `r_str_ncpy` function. Therefore I think it is very likely to be exploitable. For more general description of heap buffer overflow, see [CWE](https://cwe.mitre.org/data/definitions/122.html).

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v ≤ 5.6.6
v < 5.8.6
Affected range stops below 5.8.6, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (2)

x_refsource_CONFIRMExploitIssue TrackingPatchThird Party Advisory
https://huntr.dev/bounties/e589bd97-4c74-4e79-93b5-0951a281facc

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-122CWE-787

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card