CVE-2022-1240: radare radare2 Heap-based Buffer Overflow
Vulnerability summary
CVE-2022-1240 is a high (CVSS 7.8) Heap-based Buffer Overflow vulnerability in radare radare2. EPSS estimates a 0.74% chance of exploitation in the next 30 days, higher than 53.7% of scored vulnerabilities. 1 public exploit is recorded.
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
6 scores · 3 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 · 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.74%
Chance of exploitation in the next 30 days
Percentile
54%
Versus all other CVEs
30-day change
0.00 pp
From 0.74% on 20-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
1 foundExploit Reference (huntr.dev)
Maturity: unknown
Weaknesses
CWE · root cause- CWE-122Heap-based Buffer OverflowA heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc().
- CWE-787Out-of-bounds WriteThe product writes data past the end, or before the beginning, of the intended buffer.
Affected systems
Radare1 product
- radare2≤ 5.6.6
Radareorg1 product
- radareorg/radare2≥ unspecified, < 5.8.6
Ubuntu1 product
- radare2All versions (No fix recorded)
3 vendors · 3 products
References
4 links- huntr.dev/bounties/e589bd97-4c74-4e79-93b5-0951a281faccX Refsource CONFIRMREPORTExploitIssue TrackingPatchThird Party Advisory
- github.com/radareorg/radare2/commit/ca8d8b39f3e34a4fd943270330b80f1148129de4X Refsource MISCREPORTPatchThird Party Advisory