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

Medium 5.7 Published Updated

Attackers can bypass sys.audit security monitoring when loading legacy .pyc files because the loader fails to trigger the required audit event.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-2297?

CVE-2026-2297 is a medium-severity vulnerability in CPython, published on 4 Mar 2026. It can only be exploited from the same machine or local network, with no action from the victim.

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.

Weakness: CWE-668

Which versions are affected by CVE-2026-2297?

Linux distribution packages (7)
python39 openSUSE:Leap 15.6All versions3.9.25-150300.4.96.1
python39-core openSUSE:Leap 15.6All versions3.9.25-150300.4.96.1
python39-documentation openSUSE:Leap 15.6All versions3.9.25-150300.4.96.1
python311 openSUSE:TumbleweedAll versions3.11.15-2.1
python312 openSUSE:TumbleweedAll versions3.12.13-2.1
python313 openSUSE:TumbleweedAll versions3.13.12-2.1
python314 openSUSE:TumbleweedAll versions3.14.3-3.1

How do I fix CVE-2026-2297?

Apply the vendor's patch.

Is CVE-2026-2297 being exploited?

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

Sources

Also known as ALPINE-CVE-2026-2297, AZL-79413, AZL-79457, AZL-79491, BELL-CVE-2026-2297, DEBIAN-CVE-2026-2297 and 14 more.

Is CVE-2026-2297 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free