# CVE-2026-0864: Configuration Injection via Carriage Return (\r) in write() method

> Attackers can inject unexpected keys into configuration files by exploiting carriage return handling in the Python configparser module's write method.

- **Severity:** Medium 4.1 (`CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 23 Jun 2026
- **Updated:** 13 Aug 2026
- **Also known as:** ALPINE-CVE-2026-0864, AZL-109698, AZL-91260, BELL-CVE-2026-0864, BIT-libpython-2026-0864, BIT-python-2026-0864, BIT-python-min-2026-0864, CLSA-2026-1787312520, CLSA-2026-1787646114, CLSA-2026-1787646365, CLSA-2026-1787647093, CLSA-2026-1787648497, CLSA-2026-1787649986, CLSA-2026-1787660038, CLSA-2026-1787663936, CLSA-2026-1787664255, CLSA-2026-1787667020, CLSA-2026-1787671144, CLSA-2026-1787679403, CLSA-2026-1787680122, CLSA-2026-1787681542, CLSA-2026-1787836996, CLSA-2026-1787837013, CLSA-2026-1788001146, CLSA-2026-1788004965, CLSA-2026-1788356018, CLSA-2026-1788794163, CLSA-2026-1788794443, DEBIAN-CVE-2026-0864, ECHO-2ebb-8255-512c, GHSA-g345-7jg6-m22p, MINI-2267-jg8r-629h, MINI-6588-4pfw-4786, MINI-jgjj-x8w5-h4x4, MINI-mc77-hf2g-22m9, MINI-w8gp-32xh-jc35, PSF-2026-29, ROOT-OS-DEBIAN-11-CVE-2026-0864, ROOT-OS-DEBIAN-12-CVE-2026-0864, UBUNTU-CVE-2026-0864

## What is CVE-2026-0864?

CVE-2026-0864 is a medium-severity vulnerability in Python Python, published on 23 Jun 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

When using the "configparser" module to write configuration files
containing multi-line text values with carriage return characters (\r) the
resulting file could be injected with unexpected keys and values if the
attacker controls the written value.

Weakness: CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component)

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

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libpython` | Bitnami | All versions | 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7 |
| `python` | Bitnami | All versions | 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7 |
| `python-min` | Bitnami | All versions | 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7 |

Products: Python Python.

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

Upgrade libpython to a fixed version for your release line: 3.10.21, 3.11.16, 3.12.14 or 3.13.15.

## Is CVE-2026-0864 being exploited?

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

## Other vulnerabilities in Python Python

- [CVE-2008-5031](https://insights.sbomify.com/CVE-2008-5031/): Integer overflow in n/a (critical 10.0)
- [CVE-2014-4650](https://insights.sbomify.com/CVE-2014-4650/): Path traversal in n/a (critical 9.8)
- [CVE-2016-5636](https://insights.sbomify.com/CVE-2016-5636/): Integer overflow in n/a (critical 9.8)
- [CVE-2007-4559](https://insights.sbomify.com/CVE-2007-4559/): Path traversal in n/a (critical 9.8)
- [CVE-2017-17522](https://insights.sbomify.com/CVE-2017-17522/): Command injection in n/a (high 8.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-0864 is a medium-severity vulnerability in Python Python, published on 23 Jun 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-0864 in the wild and no public exploit code.

Affected packages and fixed versions:
- libpython (Bitnami): affected all versions; fixed in 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7
- python (Bitnami): affected all versions; fixed in 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7
- python-min (Bitnami): affected all versions; fixed in 3.10.21, 3.11.16, 3.12.14, 3.13.15, 3.14.7

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

## Sources

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

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