CVE-2026-9669

bz2.BZ2Decompressor reuse after error can cause a stack buffer overflow

Published Jun 8, 2026 CVSS 4.0 · 8.2 High EPSS < 1% KEV · Not listed
Description
bz2.BZ2Decompressor objects could be reused after a decompression error. If an application caught the resulting OSError and retried with the same decompressor, crafted input could cause the decompressor to resume from an invalid internal state and perform out-of-bounds writes to a stack buffer. This could crash the process when processing untrusted data.

Analysis

AI-generated

Technical impact

The flaw lies in Python’s bz2 module, where a BZ2Decompressor object can be reused after a decompression error. If an application catches the resulting OSError and retries with the same decompressor, carefully crafted input can cause the decompressor to resume from an invalid internal state and perform the decompressor to resume from an invalid internal state and perform out‑of‑bounds writes to a stack buffer. This produces a stack buffer overflow and out‑of-bounds write (CWE-121, CWE-787). The primary impact is a process crash, which equates to a denial of service, and it does not directly expose data or grant code execution, though repeated crashes could be leveraged in a more complex exploitation chain.

Affected Systems

Python Software Foundation CPython. Specific affected versions are not listed in the CVE entry, so all releases in use until the fix is applied may be vulnerable.

Risk and Exploitability

The CVSS score is 8.2, indicating a severe risk. EPSS score is less than 1%, indicating a very low probability of exploitation. The vulnerability is not listed in the CISA KEV catalog. Attackers can exploit the weakness, a stack buffer overflow and out‑of‑bounds write (CWE-121, CWE-787), by delivering crafted BZ2 data to any Python application that reuses a BZ2Decompressor across errors. The likely attack vector is via untrusted input, which may be received over the network, file system, or any external data source. The vulnerability remains technically exploitable until the Python interpreter is upgraded to a version that includes the fix.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update CPython to a patched release that contains the fix.
  • Deploy the updated Python runtime in all affected applications and environments.
  • Avoid reusing BZ2Decompressor objects after a decompression error; create a new decompressor instance for each operation.

Generated by OpenCVE AI on June 17, 2026 at 23:33 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4827-1 python3.11 security update
Ubuntu USN Ubuntu USN USN-8509-1 Python vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-787
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
First Time appeared Python
Python cpython
Vendors & Products Python
Python cpython
Type Values Removed Values Added
Description bz2.BZ2Decompressor objects could be reused after a decompression error. If an application caught the resulting OSError and retried with the same decompressor, crafted input could cause the decompressor to resume from an invalid internal state and perform out-of-bounds writes to a stack buffer. This could crash the process when processing untrusted data.
Title bz2.BZ2Decompressor reuse after error can cause a stack buffer overflow
Weaknesses CWE-121
References
Metrics cvssV4_0

{'score': 8.2, 'vector': 'CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
PSF
Published
Updated
Nov 10, 2026, 12:40 PM
Reserved
May 27, 2026, 3:13 AM
Status
Awaiting Analysis
Published
Jun 8, 2026, 11:17 PM
Modified
Nov 10, 2026, 1:19 PM
Severity
Moderate
Public date
Jun 8, 2026, 10:01 PM