CVE-2026-1299

email BytesGenerator header injection due to unquoted newlines

At a glance

Severity
MEDIUM 6.0
EPSS
EPSS 0.57 % · percentile 47 (2026-10-27)
State
PUBLISHED
Published
Updated
Assigner
PSF
NVD status
Deferred

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

Scores

VersionScoreVectorScored by
CVSS 4.0MEDIUM 6.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:NPSF
CVSS 4.0MEDIUM 6.0CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XNVD · cna@python.org (Secondary)

Weaknesses (CWE)

European references

CERT-FR advisories

Affected products

ProductVersions
Python Software Foundation · CPythonaffected 0 < 3.10.20 ; affected 3.11.0 < 3.11.15 ; affected 3.12.0 < 3.12.13 ; affected 3.13.0 < 3.13.12 ; affected 3.14.0 < 3.14.3 ; affected 3.15.0a1 < 3.15.0a6

References

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD