CVE-2022-1240
Heap buffer overflow in libr/bin/format/mach0/mach0.c in radareorg/radare2
Reported by @huntrdev · Published April 6, 2022
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).
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| radare2 | Alpine | 5.6.6-r0 |
| radare2 | radare | 5.6.6 |
| radareorg/radare2 | radareorg | 5.8.6 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| radareorg | radareorg/radare2 | unspecified |
| alpine | radare2 | 0 |
| radareorg | radareorg/radare2 | * |
Timeline
- Apr 6, 2022 CVE Published
- Apr 9, 2022 EPSS Score (30 in total, the first dated here)
- Aug 2, 2024 CVE Updated
- Apr 30, 2026 Security Advisory
- Jul 11, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-1240
vulnetix vdb fixes CVE-2022-1240
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-1240/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart