6.0medium
email BytesGenerator header injection due to unquoted newlines
- Severity
- 6.0medium CVSS:4.0 by PSF
- Exploit likelihood
- 0.57% (higher than 48% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- PSF
- Also known as
- PSF-2026-8BIT-LIBPYTHON-2026-1299BIT-PYTHON-2026-1299BIT-PYTHON-MIN-2026-1299
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".
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| 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 | CVE List |
| https://github.com/python/cpython | before 052e55e7d44718fe46cbba0ca995cb8fcc359413, before 0a925ab591c45d6638f37b5e57796f36fa0e56d8, before 7877fe424415bc4a13045e62a90a7277413d8cb9, before 842ce19a0c0b58d61591e8f6a708c38db1fb94e4, before 8cdf6204f4ae821f32993f8fc6bad0d318f95f36, before e417f05ad77a4c30ddc07f99e90fc0cef43e831a | Python Software Foundation |
| 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 | Bitnami Vulnerability Database |
| 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 | Bitnami Vulnerability Database |
| 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 | Bitnami Vulnerability Database |
All scores
| PSF | 6.0medium CVSS:4.0 | 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 | medium rating |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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".
NVD (es)
El módulo de correo electrónico, específicamente la clase 'BytesGenerator', no escapaba correctamente los saltos de línea para los encabezados de correo electrónico al serializar un mensaje de correo electrónico, lo que permitía la inyección de encabezados cuando se serializa un correo electrónico. Esto solo es aplicable si se utiliza 'LiteralHeader' para escribir encabezados que no respetan las reglas de plegado de correo electrónico; el nuevo comportamiento rechazará los encabezados plegados incorrectamente en 'BytesGenerator'.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-1299 changed 2026-03-03 | CVE Terms of Use |
| Python Software Foundation | PSF-2026-8 changed 2026-02-14 | CC-BY-4.0 |
| NVD | CVE-2026-1299 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-LIBPYTHON-2026-1299 changed 2026-04-10 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PYTHON-2026-1299 changed 2026-04-10 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PYTHON-MIN-2026-1299 changed 2026-04-10 | Apache-2.0 |