{"id":"CVE-2026-81878","summary":"radare2: Integer overflow causes heap out-of-bounds write in radare2 PYC parser","details":"radare2 is a UNIX-like reverse engineering framework and command-line toolset. Prior to 6.2.0, radare2's CPython bytecode .pyc marshal parser was vulnerable because the CPython marshal readers accepted a 32-bit string length without rejecting values that overflow the size-plus-one allocation. The vulnerability is triggered by opening or inspecting a crafted .pyc file through r2 or rabin2. A length of 0xffffffff wrapped the allocation to zero before the common byte reader wrote attacker-controlled data and fill bytes beyond the heap allocation. This can cause heap memory corruption and denial of service; arbitrary code execution is possible but has not been demonstrated. This issue is fixed in version 6.2.0.","aliases":["GHSA-9phv-v2w8-56j3"],"modified":"2026-09-25T08:24:10.225696Z","published":"2026-09-22T15:07:45.225Z","database_specific":{"cwe_ids":["CWE-190","CWE-787"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/81xxx/CVE-2026-81878.json","cna_assigner":"GitHub_M"},"references":[{"type":"WEB","url":"https://github.com/radareorg/radare2/releases/tag/6.2.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/81xxx/CVE-2026-81878.json"},{"type":"ADVISORY","url":"https://github.com/radareorg/radare2/security/advisories/GHSA-9phv-v2w8-56j3"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-81878"},{"type":"REPORT","url":"https://github.com/radareorg/radare2/issues/26222"},{"type":"FIX","url":"https://github.com/radareorg/radare2/commit/6727454b666b28c33837b219a5f91136461357c0"},{"type":"FIX","url":"https://github.com/radareorg/radare2/pull/26177"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/radareorg/radare2","events":[{"introduced":"0"},{"fixed":"6727454b666b28c33837b219a5f91136461357c0"},{"fixed":"e1fc278734ad62f933fc6f91edb29e4ba732f402"}],"database_specific":{"source":["AFFECTED_FIELD","REFERENCES"],"extracted_events":[{"introduced":"0"},{"fixed":"6.2.0"}]}}],"versions":["6.1.8","6.1.6","6.1.4","6.1.2","6.1.0","6.0.8","6.0.7","6.0.6","6.0.4","6.0.2","6.0.0","5.9.8","5.9.6","5.9.4","5.9.2","5.9.0","5.8.8","5.8.6","5.8.4","5.8.2","5.8.0","5.7.8","5.7.6","5.7.4","5.7.2","5.7.0","wip","5.6.8","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":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-81878.json","vanir_signatures_modified":"2026-09-25T08:24:10Z","vanir_signatures":[{"signature_version":"v1","source":"https://github.com/radareorg/radare2/commit/6727454b666b28c33837b219a5f91136461357c0","target":{"file":"libr/bin/format/pyc/marshal.c","function":"get_long_object"},"deprecated":false,"digest":{"function_hash":"193483909771336220188142129180556573423","length":1233},"id":"CVE-2026-81878-1c53e010","signature_type":"Function"},{"source":"https://github.com/radareorg/radare2/commit/6727454b666b28c33837b219a5f91136461357c0","target":{"file":"libr/bin/format/pyc/marshal.c"},"deprecated":false,"digest":{"line_hashes":["62719555000297251345979235471346456357","213696820542450623527877528552122331585","298310143903112971611982353302411212453","135913533244229467000347367372400056639","63411797339167707925604984164054751291","26508742602272319966701544053311519162","14018481382486795519270122410631109077","100410509791045044597825131190135003039","113937654110147351582706963591767159691","315958020495532751441477393000374352982","252200994563852059737829862537167284598","189084393422604771386144320633720254378","284041963721084805130619899306555821596","213118504213457659258076361067413666309","258218861353680847241289658420339104112","295288898152384988220448154504048785580","141197928183055665638919359181237382630","197948571402240308558966058741952295019","11578299530237920521647417976980300644","77132689321343786375216161116752696757","336983681380904276981839644401961674017","295817425431115331450292523179832369320","13642009482897964646845872457170841811","189083655116186302962540265449456176842","133694364979252869150965917023732496722","251121421238390307700633666951467511560","261458853681198193649413097415945018489","67423791763927751846167393109016124564","256226210152197469038934287827802530244","249256269332260873131884287888804478272"],"threshold":0.9},"id":"CVE-2026-81878-3841a851","signature_type":"Line","signature_version":"v1"},{"deprecated":false,"digest":{"length":1178,"function_hash":"293828804310686423018942555672185631617"},"id":"CVE-2026-81878-5bc3731e","signature_type":"Function","signature_version":"v1","source":"https://github.com/radareorg/radare2/commit/6727454b666b28c33837b219a5f91136461357c0","target":{"file":"libr/bin/format/pyc/marshal.c","function":"get_complex_object"}},{"digest":{"function_hash":"312175603558132869675154106529443297444","length":211},"id":"CVE-2026-81878-e7b32f28","signature_type":"Function","signature_version":"v1","source":"https://github.com/radareorg/radare2/commit/6727454b666b28c33837b219a5f91136461357c0","target":{"file":"libr/bin/format/pyc/marshal.c","function":"get_bytes"},"deprecated":false}]}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"}]}