Email Module Vulnerability in Python's BytesGenerator Class
CVE-2026-1299
6MEDIUM
What is CVE-2026-1299?
The email module in Python contains a vulnerability within the BytesGenerator class that fails to adequately quote newlines when serializing email headers. This oversight may lead to header injection vulnerabilities, particularly in scenarios where 'LiteralHeader' is used, which disregards standard email folding rules. The revised behavior introduced in recent updates will now reject headers that are incorrectly formatted, enhancing overall security.
Affected Version(s)
CPython 0 < 3.10.20
CPython 3.11.0 < 3.11.15
CPython 3.12.0 < 3.12.13
