Skip to content
Fencer Intel
medium 5.7

CVE-2026-2297 json

SourcelessFileLoader does not use io.open_code()

published 8mo ago modified 2mo ago also BIT-python-2026-2297 , BIT-python-min-2026-2297 , EUVD-2026-9498

cvss
5.7
version 4.0, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.2%
EPSS 0.2% chance of exploitation in 30 days, percentile 12%
public exploits
0
none known

Summary

The import hook in CPython that handles legacy *.pyc files (SourcelessFileLoader) is incorrectly handled in FileLoader (a base class) and so does not use io.open_code() to read the .pyc files. sys.audit handlers for this audit event therefore do not fire.

Patch / fix

  • Python Software Foundation CPython 3.10.21, 3.11.16, 3.12.14, 3.13.13, 3.14.4, 3.15.0a7
  • pypy3 Debian 14 7.3.22+dfsg-1
  • python3.11 Debian 12 3.11.2-6+deb12u8
  • python3.13 Debian 13 3.13.5-2+deb13u1
  • python3.14 Debian 14 3.14.3-4

debian advisories DEBIAN-CVE-2026-2297

  • python3.10 Ubuntu 22.04 LTS 3.10.12-1~22.04.16
  • python3.12 Ubuntu 24.04 LTS 3.12.3-1ubuntu0.15

ubuntu advisories UBUNTU-CVE-2026-2297

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python3.14 RHEL 9 3.14.4-2.el9_8
  • python3.14-idle RHEL 9 3.14.4-2.el9_8
  • python3.14-libs RHEL 9 3.14.4-2.el9_8
  • python3.14-test RHEL 9 3.14.4-2.el9_8
  • python3.14-tkinter RHEL 9 3.14.4-2.el9_8
  • python3.14-freethreading RHEL 9 3.14.4-2.el9_8
  • python3.14-freethreading-idle RHEL 9 3.14.4-2.el9_8
  • python3.14-freethreading-libs RHEL 9 3.14.4-2.el9_8

red hat advisories RHSA-2026:19176RHSA-2026:19177RHSA-2026:19064RHSA-2026:19019RHSA-2026:10950RHSA-2026:8822

  • python311 SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES 15 SP5-LTSS +6 more 3.11.15-150400.9.80.1
  • python311-core SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES 15 SP5-LTSS +6 more 3.11.15-150400.9.80.1
  • python311-documentation SLES for SAP 15 SP5, SLES for SAP 15 SP4, SLES 15 SP5-LTSS +5 more 3.11.15-150400.9.80.1
  • python311 Linux Micro 6.1 3.11.16-slfo.1.1_1.1
  • python311-core Linux Micro 6.1 3.11.16-slfo.1.1_1.1
  • python313 SLE Module for Python 3 15 SP7 3.13.13-150700.4.45.1
  • python313-core SLE Module for Python 3 15 SP7 3.13.13-150700.4.45.1
  • python311 SLES for SAP 15 SP6, SLES 15 SP6-LTSS, SLE Module for Python 3 15 SP7 +1 more 3.11.15-150600.3.53.1

suse advisories SUSE-SU-2026:4534-1SUSE-SU-2026:1117-1SUSE-SU-2026:23743-1SUSE-SU-2026:1354-1SUSE-SU-2026:1349-1SUSE-SU-2026:21104-1

  • python313 openSUSE Leap 16.0 3.13.13-160000.1.1
  • python313-core openSUSE Leap 16.0 3.13.13-160000.1.1
  • python313-nogil openSUSE Leap 16.0 3.13.13-160000.1.1
  • python313-documentation openSUSE Leap 16.0 3.13.13-160000.1.1
  • python313-nogil-nogil-core openSUSE Leap 16.0 3.13.13-160000.1.1
  • python315 openSUSE Tumbleweed 3.15.0~a8-1.1
  • python310 openSUSE Tumbleweed 3.10.20-2.1
  • python314 openSUSE Tumbleweed 3.14.3-3.1

opensuse advisories openSUSE-SU-2026:20517-1openSUSE-SU-2026:10522-1openSUSE-SU-2026:10404-1openSUSE-SU-2026:10405-1openSUSE-SU-2026:10394-1openSUSE-SU-2026:10381-1

  • python3.14 AlmaLinux 10 3.14.4-2.el10_2
  • python3.14-idle AlmaLinux 10 3.14.4-2.el10_2
  • python3.14-libs AlmaLinux 10 3.14.4-2.el10_2
  • python3.14-test AlmaLinux 10 3.14.4-2.el10_2
  • python3.14-tkinter AlmaLinux 10 3.14.4-2.el10_2
  • python3.14-freethreading AlmaLinux 10 3.14.4-2.el10_2
  • python3.14-freethreading-idle AlmaLinux 10 3.14.4-2.el10_2
  • python3.14-freethreading-libs AlmaLinux 10 3.14.4-2.el10_2

almalinux advisories ALSA-2026:19019ALSA-2026:19064ALSA-2026:19176ALSA-2026:19177ALSA-2026:10950

  • python3.14 Rocky Linux 9 3.14.4-2.el9_8
  • python3.14 Rocky Linux 10 3.14.4-2.el10_2
  • python3.12 Rocky Linux 10 3.12.13-2.el10_2
  • python3.12 Rocky Linux 9 3.12.13-2.el9_8
  • python3.12 Rocky Linux 8 3.12.13-2.el8_10

rocky linux advisories RLSA-2026:19176RLSA-2026:19019RLSA-2026:19064RLSA-2026:19177RLSA-2026:10950

  • python3 Alpine 3.23, Alpine 3.22, Alpine 3.21 3.12.14-r0
  • python3 Alpine 3.24 3.14.5-r0

alpine advisories ALPINE-CVE-2026-2297

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python3 Azure Linux 3.0 3.12.9-14

azure linux advisories AZL-79457

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Is CVE-2026-2297 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2026-2297 updated cvss 3.3

cpython: CPython: Logging Bypass in Legacy .pyc File Handling

  • Red Hat Enterprise Linux 6 python, tkinter, python-libs, python-test, python-tools Red Hat Enterprise Linux 7 python, python3, tkinter, python-libs, python-test, python-tools, +4 more
    affected: workaround, no fix planned “Out of support scope”
  • Red Hat Enterprise Linux 8 numpy, scipy, PyYAML, python3, mod_wsgi, python36, +83 more Red Hat Enterprise Linux 9 python3, python3.9, python3.11, python3-idle, python3-libs, python3-test, +6 more Red Hat Enterprise Linux AI (RHEL AI) 3 rhelai3/bootc-cuda-rhel9, rhelai3/bootc-aws-cuda-rhel9, rhelai3/bootc-gcp-cuda-rhel9, rhelai3/bootc-azure-cuda-rhel9
    affected: workaround, no fix available “Fix deferred”
  • Red Hat OpenShift AI (RHOAI) rhoai/odh-dashboard-rhel9
    under investigation
  • Red Hat Enterprise Linux AppStream (v. 8) python3.12 3.12.13-2.el8_10, python3.12-libs 3.12.13-2.el8_10, python3.12-tkinter 3.12.13-2.el8_10, python3.12-rpm-macros 3.12.13-2.el8_10
    fixed: vendor fix RHSA-2026:10950
  • Red Hat Enterprise Linux AppStream (v. 9) python3.14 3.14.4-2.el9_8, python3.12 3.12.13-2.el9_8, python3.14-libs 3.14.4-2.el9_8, python3.12-libs 3.12.13-2.el9_8, python3.14-tkinter 3.14.4-2.el9_8, python3.12-tkinter 3.12.13-2.el9_8
    fixed: vendor fix RHSA-2026:19177
  • Red Hat Enterprise Linux AppStream (v. 10) python3.14 3.14.4-2.el10_2, python3.14-libs 3.14.4-2.el10_2, python3-tkinter 3.12.13-2.el10_2, python3.14-tkinter 3.14.4-2.el10_2, python-unversioned-command 3.12.13-2.el10_2 Red Hat Enterprise Linux BaseOS (v. 10) python3 3.12.13-2.el10_2, python3.12 3.12.13-2.el10_2, python3-libs 3.12.13-2.el10_2
    fixed: vendor fix RHSA-2026:19064
  • Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) python3.14 3.14.4-2.el9_8, python3.12 3.12.13-2.el9_8, python3.14-idle 3.14.4-2.el9_8, python3.14-test 3.14.4-2.el9_8, python3.12-idle 3.12.13-2.el9_8, python3.12-test 3.12.13-2.el9_8, +7 more
    fixed: vendor fix RHSA-2026:19177
  • Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) python3-idle 3.12.13-2.el10_2, python3-test 3.12.13-2.el10_2, python3.14-idle 3.14.4-2.el10_2, python3.14-test 3.14.4-2.el10_2, python3.14-freethreading 3.14.4-2.el10_2, python3.14-freethreading-idle 3.14.4-2.el10_2, +3 more
    fixed: vendor fix RHSA-2026:19064
show 4 more
  • Red Hat Enterprise Linux CRB (v. 8) python3.12 3.12.13-2.el8_10, python3.12-idle 3.12.13-2.el8_10, python3.12-test 3.12.13-2.el8_10, python3.12-tkinter 3.12.13-2.el8_10
    fixed: vendor fix RHSA-2026:10950
  • Red Hat Hardened Images python3 3.14.4-1.hum1, python3.14 3.14.4-1.hum1, python3.11 3.11.15-4.hum1, python3.12 3.12.13-3.hum1, python3.13 3.13.13-1.hum1, python3-idle 3.14.4-1.hum1, +22 more
    fixed: vendor fix RHSA-2026:7661
  • Red Hat Update Infrastructure 5 rhui5/rhua-rhel9 1779798222, rhui5/rhua-tp-rhel9 1787241260, rhui5/installer-rhel9 1779798165, rhui5/installer-tp-rhel9 1787135742
    fixed: vendor fix RHSA-2026:21275
  • Red Hat Update Infrastructure 5 rhui5/cds-rhel9 1779798159, rhui5/cds-tp-rhel9 1787241206, rhui5/haproxy-rhel9 1779798164, rhui5/cds-kubernetes-tp-rhel9 1787241211
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
7mo ago

Exploit prediction

0.22% chance of exploitation in the next 30 days, higher than 12% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
CNA 4.0 5.7 CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
CNA 4.0 5.7 CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Affected products

  • Python Software Foundation CPython

Classification

Weakness
  • CWE-668 Exposure of Resource to Wrong Sphere

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.