# CVE-2026-3298: Out-of-bounds write in Windows asyncio.ProacterEventLoop.sock_recvfrom_into() when using nbytes

> An out-of-bounds write in Python's Windows asyncio module allows attackers to cause memory corruption or execute arbitrary code.

- **Severity:** High 8.8 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Apr 2026
- **Updated:** 13 Aug 2026
- **Also known as:** BIT-libpython-2026-3298, BIT-python-2026-3298, BIT-python-min-2026-3298, GHSA-3p9c-22jr-wq4x, MINI-6v47-g9m7-fc8f, MINI-fh4r-jmv4-58cj, MINI-p2h8-6qw2-33vg, MINI-vxfc-h69x-f5fh, MINI-xj58-qhf9-9m2x, PSF-0000-CVE-2026-3298, PSF-2026-20, ROOT-OS-ALPINE-320-CVE-2026-3298

## What is CVE-2026-3298?

CVE-2026-3298 is a high-severity memory corruption vulnerability in CPython, published on 21 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The method "sock_recvfrom_into()" of "asyncio.ProacterEventLoop" (Windows only) was missing a boundary check for the data buffer when using nbytes parameter. This allowed for an out-of-bounds buffer write if data was larger than the buffer size. Non-Windows platforms are not affected.

Weakness: CWE-787 (Out-of-bounds Write)

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

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libpython` | Bitnami | All versions | 3.11.16, 3.12.14, 3.13.14, 3.14.5 |
| `python` | Bitnami | All versions | 3.11.16, 3.12.14, 3.13.14, 3.14.5 |
| `python-min` | Bitnami | All versions | 3.11.16, 3.12.14, 3.13.14, 3.14.5 |

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

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

## Is CVE-2026-3298 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2026-3298 is a high-severity memory corruption vulnerability in CPython, published on 21 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-3298 in the wild and no public exploit code.

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

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

## Sources

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

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