Executive brief
7-Zip is a widely used file compression and archiving utility. A vulnerability in how it handles RAR5 files could allow an attacker to cause the application to crash or behave unpredictably by providing a specially crafted archive. This could disrupt operations or lead to a denial of service when processing untrusted files.
Technical details
A heap-based buffer overflow exists in the NCompress::NRar5::CDecoder component of 7-Zip. The RAR5 decoder attempts to recover from corrupted items by filling them with zeroes using My_ZeroMemory. However, a miscalculation in the 'rem' value calculation (derived from attacker-controlled item sizes) allows zeroes to be written beyond the bounds of the allocated heap buffer. While the overflow is limited to writing zeroes, it can reliably cause memory corruption and application crashes. The issue is fixed in version 25.0.0.
Affected products
- 7-Zip 7-Zip prior to 25.0.0
Timeline
- 2025-04-24: other: Reported as a private issue
- 2025-07-05: patched: Fixed in version 25.00
- 2025-07-17: disclosed: Public disclosure and CVE assignment