{"id":"CVE-2022-1240","summary":"Heap buffer overflow in libr/bin/format/mach0/mach0.c in radareorg/radare2","details":"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).","modified":"2026-08-12T12:59:06.561800Z","published":"2022-04-06T10:15:15Z","related":["openSUSE-SU-2024:12173-1"],"database_specific":{"cna_assigner":"@huntrdev","cwe_ids":["CWE-122"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1240.json"},"references":[{"type":"WEB","url":"https://huntr.dev/bounties/e589bd97-4c74-4e79-93b5-0951a281facc"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1240.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-1240"},{"type":"FIX","url":"https://github.com/radareorg/radare2/commit/ca8d8b39f3e34a4fd943270330b80f1148129de4"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/radareorg/radare2","events":[{"introduced":"0"},{"fixed":"ca8d8b39f3e34a4fd943270330b80f1148129de4"}],"database_specific":{"cpe":"cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0"},{"last_affected":"5.6.6"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["5.6.6","5.6.4","5.6.2","5.6.0","5.5.4","5.5.2","5.5.0","5.4.2","5.4.0","5.4.0-git","5.3.1","5.3.0","5.2.1","5.2.0","5.1.1","5.1.0","release-5.0.0","5.0.0","4.5.1","4.4.0","4.3.1","Continuous-Windows","4.3.0","continuous","4.2.1","4.2.0","4.1.1","4.1.0","4.0.0","3.9.0","3.8.0","3.7.1","3.7.0","3.6.0","3.5.1","3.5.0","3.4.1","3.4.0","3.3.0","3.2.1","3.2.0","3.1.3","3.1.2","3.1.1","3.1.0","3.0.1","3.0.0","2.9.0","2.8.0","2.7.0","2.6.9","2.6.0","2.5.0","2.4.0","2.2.0","2.1.0","2.0.1","2.0.0","1.6.0","1.5.0","1.4.0","1.3.0","1.3.0-git","1.2.0","1.2.0-git","1.1.0","1.0.2","1.0.1","1.0.0","1.0","0.10.6","0.10.5","0.10.4-termux4","termux","0.10.4","0.10.3","0.10.2","0.10.1","0.10.0","radare2-windows-nightly","0.9.9","0.9.8","0.9.8-rc4","0.9.8-rc3","0.9.8-rc2","0.9.8-rc1","0.9.7","0.9.6","0.9.4","0.9.2","0.9","0.8.8","0.8.6"],"database_specific":{"vanir_signatures":[{"target":{"file":"libr/bin/format/mach0/mach0.c"},"deprecated":false,"digest":{"line_hashes":["161828278200281398868133491852319055833","205039608821184489972863283820120780378","243947348467918127835772681603744836927","124829447876606044522057134775873539834"],"threshold":0.9},"id":"CVE-2022-1240-fc1ba656","signature_type":"Line","signature_version":"v1","source":"https://github.com/radareorg/radare2/commit/ca8d8b39f3e34a4fd943270330b80f1148129de4"}],"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-1240.json","vanir_signatures_modified":"2026-08-12T12:59:06Z"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:H"}]}