CPython: Unchecked Return Value
CVE-2026-11972 is a high-severity unchecked return value vulnerability in CPython from Python Software Foundation, with a CVSS 4.0 base score of 8.2 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.71% chance of exploitation within 30 days, higher than 54% of scored 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.15, 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
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Python Software Foundation | CPython | before 3.10.21; 3.11.0 up to, but not including, 3.11.16; 3.12.0 up to, but not including, 3.12.14; 3.13.0 up to, but not including, 3.13.15; 3.14.0 up to, but not including, 3.14.7; 3.15.0a1 up to, but not including, 3.15.0b4 | 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7, 3.15.0b4 |
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
- LowNo special conditions are needed; the attack works reliably.
- Attack requirements
- PresentThe target must be in a specific state or configuration for the attack to work.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Confidentiality (vulnerable system)
- NoneNo loss of confidentiality on the vulnerable system.
- Integrity (vulnerable system)
- NoneNo loss of integrity on the vulnerable system.
- Availability (vulnerable system)
- HighSerious loss of availability on the vulnerable system.
- Confidentiality (other systems)
- NoneNo loss of confidentiality on systems beyond the vulnerable one.
- Integrity (other systems)
- NoneNo loss of integrity on systems beyond the vulnerable one.
- Availability (other systems)
- NoneNo loss of availability on systems beyond the vulnerable one.
Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X. Scored by CNA (python.org).
Official description
When using the "tarfile" module with a file opened in "streaming mode" (mode="r|") the tarfile module did not properly handle EOF, making archive parsing take exponentially longer.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Unchecked Return Value
The product does not check the return value from a method or function.
How developers prevent this class of flaw
- Check the results of all functions that return a value and verify that the value is expected.
- For any pointers that could have been modified or provided from a function that can return NULL, check the pointer for NULL before use. When working with a multithreaded or otherwise asynchronous environment, ensure that proper locking APIs are used to lock before the check, and unlock when it has finished.
- Ensure that you account for all possible return values from the function.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- github.com/python/cpython/commit/3f031d431f80668e14f3bc066bbf4369cd9281b9
- github.com/python/cpython/commit/4ce6bf7c8aa7725828a38981c306f214c1f29365
- github.com/python/cpython/commit/7f0dc59c9a70f8f3b4da33d7c4a2ba552a7acc21
- github.com/python/cpython/commit/e86666c9dd256d52d0fbef6feb1ea4a51768fdec
- github.com/python/cpython/commit/eb63c0f94dfcbea7fda8eab6213818e134d67192
- github.com/python/cpython/commit/f50bf13566189c8d0ce5a814f33eff3d89951896
- github.com/python/cpython/commit/f5e2776ff0383a902c12acf2b703e7e951fc8438
- github.com/python/cpython/pull/151982
Other references
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 Unchecked Return Value vulnerabilities
- 7.5 High severity
- 7.1 High severity
- 8.3 High severity
- 7.5 High severity
- 7.5 High severity
- 7.5 High severity
Spotted an error? Tell us.