# CVE-2026-1299: email BytesGenerator header injection due to unquoted newlines

> Attackers can inject headers into emails if developers use LiteralHeader with BytesGenerator, requiring specific coding patterns to exploit.

- **Severity:** Medium 6.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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Jan 2026
- **Updated:** 3 Mar 2026
- **Also known as:** AZL-75219, AZL-75234, AZL-84290, BELL-CVE-2026-1299, BIT-libpython-2026-1299, BIT-python-2026-1299, BIT-python-min-2026-1299, CLSA-2026-1777308690, CLSA-2026-1777366733, DEBIAN-CVE-2026-1299, ECHO-addc-a9aa-706b, GHSA-jh94-8q48-f3m3, MINI-336g-rwjj-rwvq, MINI-93jg-jrgx-3x8h, MINI-h64f-6c6m-vr4w, MINI-x3gh-526c-w448, MINI-xq7g-j9m9-24w7, PSF-2026-8, SUSE-SU-2026:0873-1, SUSE-SU-2026:0884-1, SUSE-SU-2026:0891-1, SUSE-SU-2026:0897-1, SUSE-SU-2026:1090-1, UBUNTU-CVE-2026-1299, openSUSE-SU-2026:10398-1

## What is CVE-2026-1299?

CVE-2026-1299 is a medium-severity vulnerability in CPython, published on 23 Jan 2026. Any signed-in user can exploit it over the network, with no action from the victim.

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

Weakness: CWE-93 (Improper Neutralization of CRLF Sequences)

## Which versions are affected by CVE-2026-1299?

3 open source packages ship an affected version, including libpython, python and python-min.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libpython` | Bitnami | All versions | 3.10.20, 3.11.15, 3.12.13, 3.13.12, 3.14.3 |
| `python` | Bitnami | All versions | 3.10.20, 3.11.15, 3.12.13, 3.13.12, 3.14.3 |
| `python-min` | Bitnami | All versions | 3.10.20, 3.11.15, 3.12.13, 3.13.12, 3.14.3 |
| `python3` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 3.6.15-150300.10.109.1 |
| `python3-core` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 3.6.15-150300.10.109.1 |
| `python3` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 3.6.15-150300.10.109.1 |
| `python3-core` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 3.6.15-150300.10.109.1 |
| `python3` | SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 3.6.15-150300.10.109.1 |
| `python3-core` | SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 3.6.15-150300.10.109.1 |
| `python3` | SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 3.6.15-150300.10.109.1 |
| `python3-core` | SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 3.6.15-150300.10.109.1 |
| `python3` | SUSE:Linux Enterprise Micro 5.2 | All versions | 3.6.15-150300.10.109.1 |
| `python3-core` | SUSE:Linux Enterprise Micro 5.2 | All versions | 3.6.15-150300.10.109.1 |
| `python3` | SUSE:Linux Enterprise Micro 5.3 | All versions | 3.6.15-150300.10.109.1 |
| `python3-core` | SUSE:Linux Enterprise Micro 5.3 | All versions | 3.6.15-150300.10.109.1 |
| `python3` | SUSE:Linux Enterprise Micro 5.4 | All versions | 3.6.15-150300.10.109.1 |
| `python3-core` | SUSE:Linux Enterprise Micro 5.4 | All versions | 3.6.15-150300.10.109.1 |
| `python3` | SUSE:Linux Enterprise Micro 5.5 | All versions | 3.6.15-150300.10.109.1 |
| `python3-core` | SUSE:Linux Enterprise Micro 5.5 | All versions | 3.6.15-150300.10.109.1 |
| `python3` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 3.6.15-150300.10.109.1 |
| `python3-core` | SUSE:Linux Enterprise Module for Basesystem 15 SP7 | All versions | 3.6.15-150300.10.109.1 |
| `python3-core` | SUSE:Linux Enterprise Module for Development Tools 15 SP7 | All versions | 3.6.15-150300.10.109.1 |
| `python` | SUSE:Linux Enterprise Module for Package Hub 15 SP7 | All versions | 2.7.18-150000.108.1 |
| `python-base` | SUSE:Linux Enterprise Module for Package Hub 15 SP7 | All versions | 2.7.18-150000.108.1 |
| `python` | SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 2.7.18-33.69.1 |
| `python-base` | SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 2.7.18-33.69.1 |
| `python-doc` | SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 2.7.18-33.69.1 |
| `python3` | SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 3.4.10-25.175.1 |
| `python3-base` | SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 3.4.10-25.175.1 |
| `python36` | SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 3.6.15-103.1 |
| `python36-core` | SUSE:Linux Enterprise Server 12 SP5-LTSS | All versions | 3.6.15-103.1 |
| `python3` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 3.6.15-150300.10.109.1 |
| `python3-core` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 3.6.15-150300.10.109.1 |
| `python3` | SUSE:Linux Enterprise Server 15 SP5-LTSS | All versions | 3.6.15-150300.10.109.1 |
| `python3-core` | SUSE:Linux Enterprise Server 15 SP5-LTSS | All versions | 3.6.15-150300.10.109.1 |
| `python3` | SUSE:Linux Enterprise Server 15 SP6-LTSS | All versions | 3.6.15-150300.10.109.1 |
| `python3-core` | SUSE:Linux Enterprise Server 15 SP6-LTSS | All versions | 3.6.15-150300.10.109.1 |
| `python` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 2.7.18-33.69.1 |
| `python-base` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 2.7.18-33.69.1 |
| `python-doc` | SUSE:Linux Enterprise Server LTSS Extended Security 12 SP5 | All versions | 2.7.18-33.69.1 |

## How do I fix CVE-2026-1299?

Upgrade libpython to a fixed version for your release line: 3.10.20, 3.11.15, 3.12.13 or 3.13.12.

## Is CVE-2026-1299 being exploited?

There is no known exploitation of CVE-2026-1299 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-1299 and fix it if it is affected.

What it is: CVE-2026-1299 is a medium-severity vulnerability in CPython, published on 23 Jan 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-1299 in the wild and no public exploit code.

Affected packages and fixed versions:
- libpython (Bitnami): affected all versions; fixed in 3.10.20, 3.11.15, 3.12.13, 3.13.12, 3.14.3
- python (Bitnami): affected all versions; fixed in 3.10.20, 3.11.15, 3.12.13, 3.13.12, 3.14.3
- python-min (Bitnami): affected all versions; fixed in 3.10.20, 3.11.15, 3.12.13, 3.13.12, 3.14.3

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-1299/ (Markdown: https://insights.sbomify.com/CVE-2026-1299/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-1299
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-1299
- OSV: https://osv.dev/vulnerability/CVE-2026-1299

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-1299/
Summaries are generated and may contain mistakes; the official description above is the record.
