# CVE-2026-81878: radare2 heap overflow in CPython marshal parser

Source: https://junglewise.ai/threats/cve-2026-81878-radare2-is-a-unix-like-reverse-engineering-framework-and-command  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-22. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-81878 · Severity: medium · CVSS 5.5 · Published 2026-09-22

radare2 is a reverse engineering toolkit used by security researchers to analyze software binaries and code. The tool's CPython bytecode parser accepts specially crafted .pyc files and fails to validate string length fields, allowing attackers to trigger a massive heap memory corruption by opening a malicious file. This can crash the application or potentially enable arbitrary code execution during analysis of untrusted bytecode.

Technologies: [Radare2](https://junglewise.ai/threats/technologies/radare2). Vendors: [Radare](https://junglewise.ai/threats/vendors/radare).

## Quick answers

**Is CVE-2026-81878 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-81878 being exploited in the wild.

**How severe is CVE-2026-81878?** Medium severity, with a CVSS score of 5.5, published 22 September 2026.

**Which products and versions are affected?** Radare2 prior to 6.2.0.

**Is there a fix for CVE-2026-81878?** A patch was published on 2026-09-22. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-81878 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-81878?** Check whether you run Radare2 or Radare2 at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The CPython marshal parser in radare2's pyc format handler lacks a 32-bit integer overflow guard in the ASCII string object readers (get_ascii_object and get_ascii_interned_object). A length field of 0xffffffff wraps the allocation to zero when incremented, causing calloc(0) to return a minimal heap chunk. Subsequent reads then memset approximately 4GB of 0xff bytes into this undersized allocation, causing out-of-bounds heap corruption. The vulnerability is triggered automatically when opening a crafted .pyc file with r2 or rabin2 without requiring user interaction beyond file selection.

## Affected products

- radare2 radare2 prior to 6.2.0

## Timeline

- 2026-09-22: disclosed
- 2026-09-22: patched

## References

- [https://github.com/radareorg/radare2/commit/6727454b666b28c33837b219a5f91136461357c0](https://github.com/radareorg/radare2/commit/6727454b666b28c33837b219a5f91136461357c0)
- [https://github.com/radareorg/radare2/issues/26222](https://github.com/radareorg/radare2/issues/26222)

## Related threats

- [radare2 command execution via crafted binary format](https://junglewise.ai/threats/cve-2026-108387-radare2-is-a-unix-like-reverse-engineering-framework-and-command)
- [radare2 infinite loop in NE relocation parser](https://junglewise.ai/threats/cve-2026-81885-radare2-is-a-unix-like-reverse-engineering-framework-and-command)
- [radare2 is a UNIX-like reverse engineering framework and command-line toolset. Prior to 6.2.0, radare2's binary…](https://junglewise.ai/threats/cve-2026-81882-radare2-is-a-unix-like-reverse-engineering-framework-and-command)
- [radare2 is a UNIX-like reverse engineering framework and command-line toolset. Prior to 6.2.0, radare2's Mach-O Swift…](https://junglewise.ai/threats/cve-2026-81881-radare2-is-a-unix-like-reverse-engineering-framework-and-command)
- [radare2 PEF loader denial of service](https://junglewise.ai/threats/cve-2026-81880-radare2-is-a-unix-like-reverse-engineering-framework-and-command)
