CVE-2026-6100: CWE-416 Use after free in Python Software Foundation CPython
CVE-2026-6100 is a critical use-after-free vulnerability in CPython affecting the lzma. LZMADecompressor, bz2. BZ2Decompressor, and gzip. GzipFile classes. It occurs when a decompression instance is reused after a MemoryError caused by memory allocation failure during decompression. This vulnerability does not affect one-shot decompression helper functions or cases where the decompressor instance is not reused after an error. The flaw arises from a dangling pointer left uncleared in this specific error condition.
AI Analysis
Technical Summary
This vulnerability involves a use-after-free condition in CPython's decompression classes (lzma.LZMADecompressor, bz2.BZ2Decompressor, gzip.GzipFile) triggered when memory allocation fails during decompression and the same decompressor instance is reused. The issue is specific to scenarios where a MemoryError is raised and the decompressor object is reused without proper cleanup, leading to potential memory corruption. One-shot decompression functions that create new decompressor instances per call are not affected. The vulnerability has a CVSS 4.0 base score of 9.1, indicating critical severity. No official patch or remediation level has been provided yet by the Python Software Foundation, and no known exploits are reported in the wild.
Potential Impact
Successful exploitation could lead to memory corruption due to use-after-free, potentially causing crashes or arbitrary code execution in applications that reuse decompressor instances after a MemoryError. However, this requires specific conditions: memory pressure causing allocation failure and reuse of the same decompressor instance after the error. One-shot decompression calls and non-reuse of decompressor instances after errors are not vulnerable.
Mitigation Recommendations
Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until a fix is available, avoid reusing decompressor instances after a MemoryError occurs during decompression. Use one-shot decompression helper functions (lzma.decompress(), bz2.decompress(), gzip.decompress(), zlib.decompress()) which are not affected by this vulnerability.
CVE-2026-6100: CWE-416 Use after free in Python Software Foundation CPython
Description
CVE-2026-6100 is a critical use-after-free vulnerability in CPython affecting the lzma. LZMADecompressor, bz2. BZ2Decompressor, and gzip. GzipFile classes. It occurs when a decompression instance is reused after a MemoryError caused by memory allocation failure during decompression. This vulnerability does not affect one-shot decompression helper functions or cases where the decompressor instance is not reused after an error. The flaw arises from a dangling pointer left uncleared in this specific error condition.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability involves a use-after-free condition in CPython's decompression classes (lzma.LZMADecompressor, bz2.BZ2Decompressor, gzip.GzipFile) triggered when memory allocation fails during decompression and the same decompressor instance is reused. The issue is specific to scenarios where a MemoryError is raised and the decompressor object is reused without proper cleanup, leading to potential memory corruption. One-shot decompression functions that create new decompressor instances per call are not affected. The vulnerability has a CVSS 4.0 base score of 9.1, indicating critical severity. No official patch or remediation level has been provided yet by the Python Software Foundation, and no known exploits are reported in the wild.
Potential Impact
Successful exploitation could lead to memory corruption due to use-after-free, potentially causing crashes or arbitrary code execution in applications that reuse decompressor instances after a MemoryError. However, this requires specific conditions: memory pressure causing allocation failure and reuse of the same decompressor instance after the error. One-shot decompression calls and non-reuse of decompressor instances after errors are not vulnerable.
Mitigation Recommendations
Patch status is not yet confirmed — check the Python Software Foundation advisory for current remediation guidance. Until a fix is available, avoid reusing decompressor instances after a MemoryError occurs during decompression. Use one-shot decompression helper functions (lzma.decompress(), bz2.decompress(), gzip.decompress(), zlib.decompress()) which are not affected by this vulnerability.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- PSF
- Date Reserved
- 2026-04-10T21:13:45.428Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69dd2f9182d89c981f2dce1c
Added to database: 4/13/2026, 6:01:53 PM
Last enriched: 4/13/2026, 6:16:50 PM
Last updated: 4/13/2026, 9:01:53 PM
Views: 6
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.