CVE-2026-1299 PUBLISHED

email BytesGenerator header injection due to unquoted newlines

Assigner: PSF
Reserved: 21.01.2026 Published: 23.01.2026 Updated: 23.01.2026

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".

Metrics

CVSS Vector: 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
CVSS Score: 6

Product Status

Vendor Python Software Foundation
Product CPython
Versions Default: unaffected
  • affected from 0 to 3.15.0 (excl.)

References

Problem Types

  • CWE-93 CWE