CVE-2022-1240: Heap buffer overflow in libr/bin/format/mach0/mach0.c in radareorg/radare2
Vulnerability summary
CVE-2022-1240 is a high (CVSS 7.8) Heap-based Buffer Overflow vulnerability in radare radare2. EPSS estimates a 0.73% chance of exploitation in the next 30 days, higher than 55.7% of scored vulnerabilities. 1 public exploit is recorded.
Public exploit (reference, Date unknown)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 1 · Related 1Timeline
- 06-04-2022PublishedVulnerability first disclosed.
- 02-08-2024Last modifiedVulnerability information updated.
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).
CVSS metrics
7 scores · 4 sources · 3 versions- OSV · UbuntuEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- OSV · AlpineEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- OSV · UbuntuEcosystem advisory · calculated7.6HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
- NVDNIST7.6HighCVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H
EPSS trend
Probability
0.73%
Chance of exploitation in the next 30 days
Percentile
56%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.74% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundExploit Reference (huntr.dev)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
Alpine1 product
- radare2< 5.6.6-r0
Radare1 product
- radare2≤ 5.6.6
Radareorg1 product
- radareorg/radare2≥ unspecified, < 5.8.6
Ubuntu1 product
- radare2All versions (No fix recorded)
4 vendors · 4 products
References
5 links- huntr.dev/bounties/e589bd97-4c74-4e79-93b5-0951a281faccX Refsource CONFIRMREPORTExploitIssue TrackingPatchThird Party Advisory
- github.com/radareorg/radare2/commit/ca8d8b39f3e34a4fd943270330b80f1148129de4X Refsource MISCREPORTPatchThird Party Advisory