{"id":"CVE-2026-1299","state":"PUBLISHED","title":"email BytesGenerator header injection due to unquoted newlines","description":"The \nemail module, specifically the \"BytesGenerator\" class, didn’t properly quote newlines for email headers when \nserializing an email message allowing for header injection when an email\n 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\".","publishedAt":"2026-01-23T16:27:13.346Z","updatedAt":"2026-03-03T14:43:35.655Z","severity":{"score":6,"label":"Medium","version":"4.0","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","source":"PSF"},"assigner":"PSF","products":["Python Software Foundation CPython"],"affected":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.10.20","versionType":"python"},{"version":"3.11.0","status":"affected","lessThan":"3.11.15","versionType":"python"},{"version":"3.12.0","status":"affected","lessThan":"3.12.13","versionType":"python"},{"version":"3.13.0","status":"affected","lessThan":"3.13.12","versionType":"python"},{"version":"3.14.0","status":"affected","lessThan":"3.14.3","versionType":"python"},{"version":"3.15.0a1","status":"affected","lessThan":"3.15.0a6","versionType":"python"}],"modules":["email"],"repo":"https://github.com/python/cpython"}],"references":["https://github.com/python/cpython/pull/144126","https://github.com/python/cpython/issues/144125","https://cve.org/CVERecord?id=CVE-2024-6923","https://mail.python.org/archives/list/security-announce@python.org/thread/6ZZULGALJTITEAGEXLDJE2C6FORDXPBT/","https://github.com/python/cpython/commit/052e55e7d44718fe46cbba0ca995cb8fcc359413","https://github.com/python/cpython/commit/0a925ab591c45d6638f37b5e57796f36fa0e56d8","https://github.com/python/cpython/commit/7877fe424415bc4a13045e62a90a7277413d8cb9","https://github.com/python/cpython/commit/842ce19a0c0b58d61591e8f6a708c38db1fb94e4","https://github.com/python/cpython/commit/8cdf6204f4ae821f32993f8fc6bad0d318f95f36","https://github.com/python/cpython/commit/e417f05ad77a4c30ddc07f99e90fc0cef43e831a"],"weaknesses":["CWE-93"],"ingestedAt":"2026-10-29T20:11:10.572Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/1xxx/CVE-2026-1299.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-1299","state":"PUBLISHED","datePublished":"2026-01-23T16:27:13.346Z","dateUpdated":"2026-03-03T14:43:35.655Z","assignerShortName":"PSF","assignerOrgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateReserved":"2026-01-21T18:30:52.594Z"},"containers":{"cna":{"title":"email BytesGenerator header injection due to unquoted newlines","descriptions":[{"lang":"en","value":"The \nemail module, specifically the \"BytesGenerator\" class, didn’t properly quote newlines for email headers when \nserializing an email message allowing for header injection when an email\n 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":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.10.20","versionType":"python"},{"version":"3.11.0","status":"affected","lessThan":"3.11.15","versionType":"python"},{"version":"3.12.0","status":"affected","lessThan":"3.12.13","versionType":"python"},{"version":"3.13.0","status":"affected","lessThan":"3.13.12","versionType":"python"},{"version":"3.14.0","status":"affected","lessThan":"3.14.3","versionType":"python"},{"version":"3.15.0a1","status":"affected","lessThan":"3.15.0a6","versionType":"python"}],"modules":["email"],"repo":"https://github.com/python/cpython"}],"references":[{"url":"https://github.com/python/cpython/pull/144126","tags":["patch"]},{"url":"https://github.com/python/cpython/issues/144125","tags":["issue-tracking"]},{"url":"https://cve.org/CVERecord?id=CVE-2024-6923","tags":["related"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/6ZZULGALJTITEAGEXLDJE2C6FORDXPBT/","tags":["vendor-advisory"]},{"url":"https://github.com/python/cpython/commit/052e55e7d44718fe46cbba0ca995cb8fcc359413","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/0a925ab591c45d6638f37b5e57796f36fa0e56d8","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/7877fe424415bc4a13045e62a90a7277413d8cb9","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/842ce19a0c0b58d61591e8f6a708c38db1fb94e4","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/8cdf6204f4ae821f32993f8fc6bad0d318f95f36","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/e417f05ad77a4c30ddc07f99e90fc0cef43e831a","tags":["patch"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"NETWORK","baseScore":6,"baseSeverity":"MEDIUM","exploitMaturity":"NOT_DEFINED","privilegesRequired":"LOW","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"LOW","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-93","description":"CWE-93","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"PSF","orgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateUpdated":"2026-03-03T14:43:35.655Z"},"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 0.5.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-01-23T16:55:59.722632Z","id":"CVE-2026-1299","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-01-23T16:56:22.155Z"}}]}}}