_write_headers
Lib/email/generator.py
Last patched
Overview
_write_headers in Lib/email/generator.py (python/cpython) was changed by 2 published CVE fixes between 2024 and 2026, in 7 distinct patches that added or removed 25 lines in total.
python/cpython has 132 CVEs with a located fix in total, so 2% of them touched this function.
CVEs that patched it
Every published CVE whose fix changed _write_headers, newest first, with the lines each fix touched.
CVE-2026-1299 · lines 433–442 · +10 −1
Medium · CVSS 6.0EPSS 0.6%2026-01-23CVE-2024-6923 · lines 228–240 · +13 −1
Medium · CVSS 5.5EPSS 1.1%2024-08-01
Get an alert when the next CVE fix lands in python/cpython, with the patched functions.
Monitor these CVEsOther hotspots in the repository
Functions in python/cpython changed by the most distinct patches.
Frequently asked questions
Common questions about CVE fixes to _write_headers.
- How many CVEs have patched _write_headers?
- 2 published CVEs changed _write_headers in python/cpython, in 7 distinct patches totalling 25 changed lines, between 2024 and 2026.
- What is the latest CVE that changed _write_headers?
- CVE-2026-1299 (email BytesGenerator header injection due to unquoted newlines), published 2026-01-23, changed lines 433 to 442 of Lib/email/generator.py.
- How does _write_headers compare to the rest of python/cpython?
- python/cpython has 132 CVEs with a located fix in total; 2 of them changed _write_headers.
- What do the line numbers refer to?
- Line numbers are in the fixed version of the file, as the upstream patch left it. A CVE whose fix was backported to several branches is listed once, with the lines from the upstream commit.
References
- Lib/email/generator.py on GitHub (opens in a new tab)
- All patched functions in python/cpython
- Patched functions directory
Fix locations are computed by RadicalNotion.AI from the upstream patch diff of each CVE. CVE data is sourced from the CVE Program.
Track python/cpython CVEs
Get an alert when a new CVE lands in this repository, with the patched functions and AI-written remediation guidance.