# CVE-2026-1299: email BytesGenerator header injection due to unquoted newlines

- Severity: Medium 6.0 (CVSS:4.0, scored by PSF) `CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.57%, higher than 48% of CVEs (2026-12-01)
- Published: 2026-01-23T16:27:13.346Z
- Modified: 2026-06-17T10:15:28.543Z
- Also known as: PSF-2026-8, BIT-LIBPYTHON-2026-1299, BIT-PYTHON-2026-1299, BIT-PYTHON-MIN-2026-1299
- Weaknesses: CWE-93
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: PSF

## Description

The 
email module, specifically the "BytesGenerator" class, didn’t properly quote newlines for email headers when 
serializing an email message allowing for header injection when an email
 is serialized. This is only applicable if using "LiteralHeader" writing headers that don't respect email folding rules, the new behavior will reject the incorrectly folded headers in "BytesGenerator".

(As written by CVE List.)

## Affected

- Python Software Foundation CPython: before 3.10.20; from 3.11.0 before 3.11.15; from 3.12.0 before 3.12.13; from 3.13.0 before 3.13.12; from 3.14.0 before 3.14.3; from 3.15.0a1 before 3.15.0a6
- https://github.com/python/cpython: before 052e55e7d44718fe46cbba0ca995cb8fcc359413; before 0a925ab591c45d6638f37b5e57796f36fa0e56d8; before 7877fe424415bc4a13045e62a90a7277413d8cb9; before 842ce19a0c0b58d61591e8f6a708c38db1fb94e4; before 8cdf6204f4ae821f32993f8fc6bad0d318f95f36; before e417f05ad77a4c30ddc07f99e90fc0cef43e831a
- libpython (Bitnami): before 3.10.20; from 3.11.0 before 3.11.15; from 3.12.0 before 3.12.13; from 3.13.0 before 3.13.12; from 3.14.0 before 3.14.3
- python (Bitnami): before 3.10.20; from 3.11.0 before 3.11.15; from 3.12.0 before 3.12.13; from 3.13.0 before 3.13.12; from 3.14.0 before 3.14.3
- python-min (Bitnami): before 3.10.20; from 3.11.0 before 3.11.15; from 3.12.0 before 3.12.13; from 3.13.0 before 3.13.12; from 3.14.0 before 3.14.3

## Every score

- PSF: CVSS:4.0 6.0 Medium `CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/python/cpython/pull/144126> (patch, web)
- <https://github.com/python/cpython/issues/144125> (issue-tracking, report, web)
- <https://cve.org/CVERecord?id=CVE-2024-6923> (related, web)
- <https://mail.python.org/archives/list/security-announce@python.org/thread/6ZZULGALJTITEAGEXLDJE2C6FORDXPBT/> (advisory, vendor-advisory, web)
- <https://github.com/python/cpython/commit/052e55e7d44718fe46cbba0ca995cb8fcc359413> (fix, patch, web)
- <https://github.com/python/cpython/commit/0a925ab591c45d6638f37b5e57796f36fa0e56d8> (fix, patch, web)
- <https://github.com/python/cpython/commit/7877fe424415bc4a13045e62a90a7277413d8cb9> (fix, patch, web)
- <https://github.com/python/cpython/commit/842ce19a0c0b58d61591e8f6a708c38db1fb94e4> (fix, patch, web)
- <https://github.com/python/cpython/commit/8cdf6204f4ae821f32993f8fc6bad0d318f95f36> (fix, patch, web)
- <https://github.com/python/cpython/commit/e417f05ad77a4c30ddc07f99e90fc0cef43e831a> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-1299> (web)

## Sources

- CVE List: [CVE-2026-1299](https://www.cve.org/CVERecord?id=CVE-2026-1299), CVE Terms of Use, modified 2026-03-03
- Python Software Foundation: [PSF-2026-8](https://osv.dev/vulnerability/PSF-2026-8), CC-BY-4.0, modified 2026-02-14
- NVD: [CVE-2026-1299](https://nvd.nist.gov/vuln/detail/CVE-2026-1299), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-LIBPYTHON-2026-1299](https://osv.dev/vulnerability/BIT-LIBPYTHON-2026-1299), Apache-2.0, modified 2026-04-10
- Bitnami Vulnerability Database: [BIT-PYTHON-2026-1299](https://osv.dev/vulnerability/BIT-PYTHON-2026-1299), Apache-2.0, modified 2026-04-10
- Bitnami Vulnerability Database: [BIT-PYTHON-MIN-2026-1299](https://osv.dev/vulnerability/BIT-PYTHON-MIN-2026-1299), Apache-2.0, modified 2026-04-10

---

Page: https://cve.day/CVE-2026-1299 · Whole record: https://cve.day/CVE-2026-1299.json · Rebuilt by cve.day 2026-11-25T22:59:13.147Z
