CPython: Use After Free
CVE-2026-6100 is a high-severity use after free vulnerability in CPython from Python Software Foundation, with a CVSS 3.1 base score of 8.1 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists versions 3.10.21, 3.11.16, 3.12.14 as the first without the flaw, so updating CPython to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.59% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update CPython to 3.10.21 or 3.11.16 or 3.12.14 or 3.13.14, whichever matches your release line, or a later version.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- HighSuccess depends on conditions outside the attacker's control.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by CNA.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 4.0 | 9.1 | Critical | CNA (python.org) |
| CVSS 3.1 | 8.1 | High | CNA |
Official description
Use-after-free (UAF) was possible in the `lzma.LZMADecompressor`, `bz2.BZ2Decompressor`, and `gzip.GzipFile` when a memory allocation fails with a `MemoryError` and the decompression instance is re-used. This scenario can be triggered if the process is under memory pressure. The fix cleans up the dangling pointer in this specific error condition. The vulnerability is only present if the program re-uses decompressor instances across multiple decompression calls even after a `MemoryError` is raised during decompression. Using the helper functions to one-shot decompress data such as `lzma.decompress()`, `bz2.decompress()`, `gzip.decompress()`, and `zlib.decompress()` are not affected as a new decompressor instance is used per call. If the decompressor instance is not re-used after an error condition, this usage is similarly not vulnerable.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use After Free
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory belongs to the code that operates on the new pointer.
How developers prevent this class of flaw
- Choose a language that provides automatic memory management.
- When freeing pointers, be sure to set them to NULL once they are freed. However, the utilization of multiple or complex data structures may lower the usefulness of this strategy.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/python/cpython/commit/47128e64f98c3a20271138a98c2922bea2a3ee0e
- github.com/python/cpython/commit/6a5f79c8d7bbf22b083b240910c7a8781a59437d
- github.com/python/cpython/commit/8fc66aef6d7b3ae58f43f5c66f9366cc8cbbfcd2
- github.com/python/cpython/commit/c3cf71c3366fe49acb776a639405c0eea6169c20
- github.com/python/cpython/commit/e20c6c9667c99ecaab96e1a2b3767082841ffc8b
- github.com/python/cpython/commit/ea8d735eb084cf8cc021df1a30e90d10a8f052e3
- github.com/python/cpython/pull/148396
Other references
- github.com/python/cpython/issues/148395
- mail.python.org/archives/list/[email protected]/thread/HTWB2Z6KT5QQX4RYEZAFININDHNOSIF3/
- openwall.com/lists/oss-security/2026/04/13/10
- access.redhat.com/errata/RHSA-2026:10117
- access.redhat.com/errata/RHSA-2026:10140
- access.redhat.com/errata/RHSA-2026:10141
- access.redhat.com/errata/RHSA-2026:10711
- access.redhat.com/errata/RHSA-2026:10745
- access.redhat.com/errata/RHSA-2026:10774
- access.redhat.com/errata/RHSA-2026:10949
- access.redhat.com/errata/RHSA-2026:10950
- access.redhat.com/errata/RHSA-2026:11062
- access.redhat.com/errata/RHSA-2026:11077
- access.redhat.com/errata/RHSA-2026:11768
- access.redhat.com/errata/RHSA-2026:13692
Other vulnerabilities in CPython
- 8.2 High severity
- 9.4 Critical severity
- 7.6 High severity
- 9.2 Critical severity
- 8.4 High severity
- 7.5 High severity
Recent Use After Free vulnerabilities
- 8.4 High severity
- 7.0 High severity
- 7.8 High severity
- 9.6 Critical severity
- 7.8 High severity
- 8.8 High severity
Spotted an error? Tell us.