CVE-2023-31102
📋 TL;DR
This vulnerability in 7-Zip's PPMd7 compression module allows attackers to craft malicious 7Z archives that trigger an integer underflow, leading to invalid memory reads. Successful exploitation could allow arbitrary code execution or application crashes. All users of 7-Zip versions before 23.00 are affected.
💻 Affected Systems
- 7-Zip
📦 What is this software?
7 Zip by 7 Zip
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution with the privileges of the 7-Zip process, potentially leading to full system compromise if running with elevated privileges.
Likely Case
Application crash (denial of service) or limited information disclosure through memory reads.
If Mitigated
No impact if proper controls prevent processing of untrusted archives or if patched version is used.
🎯 Exploit Status
Proof-of-concept available in public references. Exploitation requires user to open crafted archive.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 23.00 and later
Vendor Advisory: https://www.7-zip.org/download.html
Restart Required: No
Instructions:
1. Download 7-Zip 23.00 or later from official website. 2. Run installer. 3. Follow installation prompts. 4. Verify version in About dialog.
🔧 Temporary Workarounds
Disable PPMd compression handling
windowsConfigure 7-Zip to avoid processing PPMd-compressed archives
Not applicable - requires registry/configuration changes
Use alternative archive tools
allTemporarily use other archive software until patched
🧯 If You Can't Patch
- Implement application whitelisting to block 7-Zip execution
- Use network filtering to block download of .7z files from untrusted sources
🔍 How to Verify
Check if Vulnerable:
Check 7-Zip version in Help > About (GUI) or run '7z' command with version flag
Check Version:
7z | findstr "Version" (Windows) or 7z --help | grep Version (Linux)
Verify Fix Applied:
Confirm version is 23.00 or higher
📡 Detection & Monitoring
Log Indicators:
- Application crashes of 7z.exe or 7zG.exe
- Unexpected memory access errors in system logs
Network Indicators:
- Downloads of .7z files from suspicious sources
- Multiple failed archive extraction attempts
SIEM Query:
EventID=1000 Source=Application Error ProcessName=7z*.exe
🔗 References
- https://ds-security.com/post/integer-overflow-in-7-zip-cve-2023-31102/
- https://security.netapp.com/advisory/ntap-20231110-0007/
- https://sourceforge.net/p/sevenzip/discussion/45797/thread/713c8a8269/
- https://www.7-zip.org/download.html
- https://www.zerodayinitiative.com/advisories/ZDI-23-1165/
- https://ds-security.com/post/integer-overflow-in-7-zip-cve-2023-31102/
- https://security.netapp.com/advisory/ntap-20231110-0007/
- https://sourceforge.net/p/sevenzip/discussion/45797/thread/713c8a8269/
- https://www.7-zip.org/download.html
- https://www.zerodayinitiative.com/advisories/ZDI-23-1165/