Vulnerability · Published Mar 4, 2026 · Assigned by PSF

CVE-2026-2297SourcelessFileLoader does not use io.open_code()

Medium 5.7

In plain English

A medium-severity security flaw in CPython from Python Software Foundation. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)5.7Medium
Exploit odds (30 days)0.2%top 87.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:10python-unversioned-command3.12.13-2.el10_2ALSA-2026:19064
AlmaLinux:10python33.12.13-2.el10_2ALSA-2026:19064
AlmaLinux:10python3-debug3.12.13-2.el10_2ALSA-2026:19064
AlmaLinux:10python3-devel3.12.13-2.el10_2ALSA-2026:19064
AlmaLinux:10python3-idle3.12.13-2.el10_2ALSA-2026:19064
AlmaLinux:10python3-libs3.12.13-2.el10_2ALSA-2026:19064
AlmaLinux:10python3-test3.12.13-2.el10_2ALSA-2026:19064
AlmaLinux:10python3-tkinter3.12.13-2.el10_2ALSA-2026:19064
AlmaLinux:8python3.123.12.13-2.el8_10ALSA-2026:10950
AlmaLinux:9python3.123.12.13-2.el9_8ALSA-2026:19177
AlmaLinux:8python3.12-debug3.12.13-2.el8_10ALSA-2026:10950
AlmaLinux:9python3.12-debug3.12.13-2.el9_8ALSA-2026:19177
AlmaLinux:8python3.12-devel3.12.13-2.el8_10ALSA-2026:10950
AlmaLinux:9python3.12-devel3.12.13-2.el9_8ALSA-2026:19177
AlmaLinux:8python3.12-idle3.12.13-2.el8_10ALSA-2026:10950
AlmaLinux:9python3.12-idle3.12.13-2.el9_8ALSA-2026:19177
AlmaLinux:8python3.12-libs3.12.13-2.el8_10ALSA-2026:10950
AlmaLinux:9python3.12-libs3.12.13-2.el9_8ALSA-2026:19177
AlmaLinux:8python3.12-rpm-macros3.12.13-2.el8_10ALSA-2026:10950
AlmaLinux:8python3.12-test3.12.13-2.el8_10ALSA-2026:10950
AlmaLinux:9python3.12-test3.12.13-2.el9_8ALSA-2026:19177
AlmaLinux:8python3.12-tkinter3.12.13-2.el8_10ALSA-2026:10950
AlmaLinux:9python3.12-tkinter3.12.13-2.el9_8ALSA-2026:19177
AlmaLinux:10python3.143.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.143.14.4-2.el9_8ALSA-2026:19176
AlmaLinux:10python3.14-debug3.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.14-debug3.14.4-2.el9_8ALSA-2026:19176
AlmaLinux:10python3.14-devel3.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.14-devel3.14.4-2.el9_8ALSA-2026:19176
AlmaLinux:10python3.14-freethreading3.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.14-freethreading3.14.4-2.el9_8ALSA-2026:19176
AlmaLinux:10python3.14-freethreading-debug3.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.14-freethreading-debug3.14.4-2.el9_8ALSA-2026:19176
AlmaLinux:10python3.14-freethreading-devel3.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.14-freethreading-devel3.14.4-2.el9_8ALSA-2026:19176
AlmaLinux:10python3.14-freethreading-idle3.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.14-freethreading-idle3.14.4-2.el9_8ALSA-2026:19176
AlmaLinux:10python3.14-freethreading-libs3.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.14-freethreading-libs3.14.4-2.el9_8ALSA-2026:19176
AlmaLinux:10python3.14-freethreading-test3.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.14-freethreading-test3.14.4-2.el9_8ALSA-2026:19176
AlmaLinux:10python3.14-freethreading-tkinter3.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.14-freethreading-tkinter3.14.4-2.el9_8ALSA-2026:19176
AlmaLinux:10python3.14-idle3.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.14-idle3.14.4-2.el9_8ALSA-2026:19176
AlmaLinux:10python3.14-libs3.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.14-libs3.14.4-2.el9_8ALSA-2026:19176
AlmaLinux:10python3.14-test3.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.14-test3.14.4-2.el9_8ALSA-2026:19176
AlmaLinux:10python3.14-tkinter3.14.4-2.el10_2ALSA-2026:19019
AlmaLinux:9python3.14-tkinter3.14.4-2.el9_8ALSA-2026:19176
Alpine:v3.21python33.12.14-r0ALPINE-CVE-2026-2297
Alpine:v3.22python33.12.14-r0ALPINE-CVE-2026-2297
Alpine:v3.23python33.12.14-r0ALPINE-CVE-2026-2297
Alpine:v3.24python33.14.5-r0ALPINE-CVE-2026-2297
Debian:12pypy3no fix listedDEBIAN-CVE-2026-2297
Debian:13pypy3no fix listedDEBIAN-CVE-2026-2297
Debian:14pypy37.3.22+dfsg-1DEBIAN-CVE-2026-2297
Debian:12python3.113.11.2-6+deb12u8DEBIAN-CVE-2026-2297
Debian:13python3.133.13.5-2+deb13u1DEBIAN-CVE-2026-2297
Debian:14python3.143.14.3-4DEBIAN-CVE-2026-2297
Rocky Linux:10python3.120:3.12.13-2.el10_2RLSA-2026:19064
Rocky Linux:8python3.120:3.12.13-2.el8_10RLSA-2026:10950
Rocky Linux:9python3.120:3.12.13-2.el9_8RLSA-2026:19177
Rocky Linux:10python3.140:3.14.4-2.el10_2RLSA-2026:19019
Rocky Linux:9python3.140:3.14.4-2.el9_8RLSA-2026:19176
Ubuntu:22.04:LTSpython3.103.10.12-1~22.04.16USN-8509-1
Ubuntu:22.04:LTSpython3.103.10.12-1~22.04.16UBUNTU-CVE-2026-2297
Ubuntu:24.04:LTSpython3.123.12.3-1ubuntu0.15USN-8509-1
Ubuntu:24.04:LTSpython3.123.12.3-1ubuntu0.15UBUNTU-CVE-2026-2297
Ubuntu:25.10python3.13no fix listedUBUNTU-CVE-2026-2297
Ubuntu:25.10python3.14no fix listedUBUNTU-CVE-2026-2297
Ubuntu:26.04:LTSpython3.143.14.4-1ubuntu0.1USN-8509-1

Affected products (as reported)

VendorProductVersions
Python Software Foundation CPython 0 – before 3.10.213.11.0 – before 3.11.163.12.0 – before 3.12.143.13.0 – before 3.13.133.14.0 – before 3.14.43.15.0a1 – before 3.15.0a7

Weakness: CWE-668 · Vector: 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

References