# CVE-2025-1795: Mishandling of comma during folding and unicode-encoding of email headers

> Incorrect comma encoding in email headers can cause mail server misinterpretation, affecting Python applications using the email module.

- **Severity:** Low 2.3 (`CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:L/VI:N/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:** 28 Feb 2025
- **Updated:** 31 Jul 2026
- **Also known as:** AZL-57675, BIT-libpython-2025-1795, BIT-python-2025-1795, BIT-python-min-2025-1795, CLSA-2025-1755270833, DEBIAN-CVE-2025-1795, ECHO-27f5-2176-4abe, GHSA-c266-vjjr-2v8j, MINI-gqgw-2f83-qcpf, OESA-2025-2303, PSF-2025-3, SUSE-SU-2025:0883-1, SUSE-SU-2025:0981-1, SUSE-SU-2025:0982-1, UBUNTU-CVE-2025-1795, openSUSE-SU-2025:14872-1, openSUSE-SU-2025:14873-1, openSUSE-SU-2025:14885-1

## What is CVE-2025-1795?

CVE-2025-1795 is a low-severity vulnerability in CPython, published on 28 Feb 2025. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

During an address list folding when a separating comma ends up on a folded line and that line is to be unicode-encoded then the separator itself is also unicode-encoded. Expected behavior is that the separating comma remains a plan comma. This can result in the address header being misinterpreted by some mail servers.

Weakness: CWE-116 (Improper Encoding or Escaping of Output)

## Which versions are affected by CVE-2025-1795?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libpython` | Bitnami | All versions | 3.9.23, 3.10.17, 3.11.9, 3.12.3 |
| `python` | Bitnami | All versions | 3.9.23, 3.10.17, 3.11.9, 3.12.3 |
| `python-min` | Bitnami | All versions | 3.9.23, 3.10.17, 3.11.11, 3.12.8 |
| `python311-core` | SUSE:Linux Enterprise Module for Basesystem 15 SP6 | All versions | 3.11.11-150600.3.21.1 |
| `python311` | SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 3.11.11-150400.9.49.1 |
| `python311-core` | SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 3.11.11-150400.9.49.1 |
| `python311` | SUSE:Linux Enterprise Module for Python 3 15 SP6 | All versions | 3.11.11-150600.3.21.1 |
| `python311-core` | SUSE:Linux Enterprise Module for Python 3 15 SP6 | All versions | 3.11.11-150600.3.21.1 |
| `python312` | SUSE:Linux Enterprise Module for Python 3 15 SP6 | All versions | 3.12.9-150600.3.21.1 |
| `python312-core` | SUSE:Linux Enterprise Module for Python 3 15 SP6 | All versions | 3.12.9-150600.3.21.1 |
| `python311` | openSUSE:Leap 15.6 | All versions | 3.11.11-150600.3.21.1 |
| `python311-core` | openSUSE:Leap 15.6 | All versions | 3.11.11-150600.3.21.1 |
| `python311-documentation` | openSUSE:Leap 15.6 | All versions | 3.11.11-150600.3.21.1 |
| `python312` | openSUSE:Leap 15.6 | All versions | 3.12.9-150600.3.21.1 |
| `python312-core` | openSUSE:Leap 15.6 | All versions | 3.12.9-150600.3.21.1 |
| `python312-documentation` | openSUSE:Leap 15.6 | All versions | 3.12.9-150600.3.21.1 |
| `python311` | openSUSE:Tumbleweed | All versions | 3.11.11-4.1 |
| `python312` | openSUSE:Tumbleweed | All versions | 3.12.9-2.1 |
| `python313` | openSUSE:Tumbleweed | All versions | 3.13.2-3.1 |

## How do I fix CVE-2025-1795?

Upgrade libpython to a fixed version for your release line: 3.9.23, 3.10.17, 3.11.9 or 3.12.3.

## Is CVE-2025-1795 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-1795 and fix it if it is affected.

What it is: CVE-2025-1795 is a low-severity vulnerability in CPython, published on 28 Feb 2025. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-1795 in the wild and no public exploit code.

Affected packages and fixed versions:
- libpython (Bitnami): affected all versions; fixed in 3.9.23, 3.10.17, 3.11.9, 3.12.3
- python (Bitnami): affected all versions; fixed in 3.9.23, 3.10.17, 3.11.9, 3.12.3
- python-min (Bitnami): affected all versions; fixed in 3.9.23, 3.10.17, 3.11.11, 3.12.8

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-2025-1795/ (Markdown: https://insights.sbomify.com/CVE-2025-1795/index.md)
```

## Sources

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

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