CVE-2026-0865: Python Software Foundation CPython · Injection
Affects Python Software Foundation CPythonSource CVE Database V5
Not known to be exploited · CVSS 5.9 Medium · fixed in 3.15.0a6 : update Python Software Foundation CPython when convenient.
Data as of 26 Oct 2026, 10:12 UTC
- EPSS
- 0.5% chance of exploitation in 30 days – higher than 46% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.15.0a6, 3.14.3, 3.13.12 +3
CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 20 Jan 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade to a fixed release listed under Affected software.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| Python Software FoundationCPython | Affected
| Fixed in
|
| Python Software FoundationCPython | Affected
| Fixed in
|
| Python Software FoundationCPython | Affected
| Fixed in
|
| Python Software FoundationCPython | Affected
| Fixed in
|
| Python Software FoundationCPython | Affected
| Fixed in
|
| Python Software FoundationCPython | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate CVE-2026-0865, organizations should promptly upgrade to a CPython version where this vulnerability is patched once available. Until then, implement strict input validation and sanitization on all user-supplied HTTP header names and values to reject or escape newline and other control characters that could enable header injection. Employ web application firewalls (WAFs) with rules designed to detect and block HTTP header injection attempts. Review and harden any custom HTTP header processing code to ensure it does not trust user input blindly. Additionally, limit the privileges of accounts that can send or modify HTTP headers to reduce the risk of exploitation. Monitor logs for suspicious header anomalies indicative of injection attempts. For Python web frameworks or libraries built on CPython, verify that they have incorporated patches or mitigations against this vulnerability. Finally, conduct security testing focused on HTTP header injection to identify and remediate vulnerable endpoints.
Description
User-controlled header names and values containing newlines can allow injecting HTTP headers.
References
- github.com/python/cpython/pull/143917 (opens in a new tab)
- github.com/python/cpython/issues/143916 (opens in a new tab)
- mail.python.org/archives/list/security-announce@python.org/thread/BJ6QPHNSHJTS3A7CFV6IBMCAP2DWRVNT/ (opens in a new tab)
- github.com/python/cpython/commit/22e4d55285cee52bc4dbe061324e5f30bd4dee58 (opens in a new tab)
- github.com/python/cpython/commit/23e3c0ae867cca0130e441e776c9955b9027c510 (opens in a new tab)
- github.com/python/cpython/commit/4802b96a2cde58570c24c13ef3289490980961c5 (opens in a new tab)
- github.com/python/cpython/commit/f7fceed79ca1bceae8dbe5ba5bc8928564da7211 (opens in a new tab)
- github.com/python/cpython/commit/2f840249550e082dc351743f474ba56da10478d2 (opens in a new tab)
- github.com/python/cpython/commit/e4846a93ac07a8ae9aa18203af0dd13d6e7a6995 (opens in a new tab)
- github.com/python/cpython/commit/66da7bf6fe7b81e3ecc9c0a25bd47d4616c8d1a6 (opens in a new tab)
- github.com/python/cpython/commit/83ecd18779f286d872f68bfce175651e407d9fff (opens in a new tab)
- github.com/python/cpython/commit/bfba660085767f8c2d582134e9d511a85eda04cf (opens in a new tab)
- github.com/python/cpython/commit/286e3ac39984fe85a17f4ab39c64d382137aae5f (opens in a new tab)
- github.com/python/cpython/commit/8bb044d29310bb05d15086cdaa8bf64867d61a97 (opens in a new tab)
- github.com/python/cpython/commit/c592227ffb48679af9845a45dbb0875d975bb219 (opens in a new tab)