CVE-2026-2297
SourcelessFileLoader does not use io.open_code()
Reported by psf · Published March 4, 2026
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| python3.14-freethreading-tkinter | errata.rockylinux.org | 3.14.4-2.el9, 3.14.4-2.el10 |
| python3.12-debugsource | errata.rockylinux.org | 3.12.13-2.el9, 3.12.13-2.el8, 3.12.13-2.el10, 0:3.12.13-2.el8_10.aarch64 |
| python3.14-tkinter | errata.rockylinux.org | 3.14.4-2.el9, 3.14.4-2.el10 |
| python3.14-debug | errata.rockylinux.org | 3.14.4-2.el9, 3.14.4-2.el10 |
| python3.14-test | errata.rockylinux.org | 3.14.4-2.el9, 3.14.4-2.el10 |
| python3.14 | errata.rockylinux.org | 3.14.4-2.el9, 3.14.4-2.el10 |
| python3.13-test | Amazon Linux | 3.13.13-1.amzn2023.0.1 |
| python3 | errata.rockylinux.org | 3.12.13-2.el10 |
| python3.12 | errata.rockylinux.org | 3.12.13-2.el9, 3.12.13-2.el8, 3.12.13-2.el10, 0:3.12.13-2.el8_10.x86_64, 0:3.12.13-2.el8_10.src, 0:3.12.13-2.el8_10.i686 |
| python-unversioned-command | errata.rockylinux.org | 3.12.13-2.el10 |
| python3.12-devel | errata.rockylinux.org | 3.12.13-2.el9, 3.12.13-2.el8, 0:3.12.13-2.el8_10.x86_64, 0:3.12.13-2.el8_10.i686, 0:3.12.13-2.el8_10.aarch64 |
| python3.14-freethreading-devel | errata.rockylinux.org | 3.14.4-2.el10 |
39 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Python Software Foundation | CPython | 0, 3.11.0, 3.12.0 |
| Python Software Foundation | CPython | 0, 3.11.0, 3.12.0 |
Timeline
- Mar 4, 2026 CVE Published
- Mar 5, 2026 EPSS Score (30 in total, the first dated here)
- Mar 5, 2026 PoC Published (6 in total, the first dated here)
- Mar 22, 2026 Coalition ESS Score (2 in total, the first dated here)
- Apr 14, 2026 Security Advisory (16 in total, the first dated here)
- Apr 28, 2026 Distribution Patch (13 in total, the first dated here)
- Jul 9, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2026-2297
vulnetix vdb fixes CVE-2026-2297
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2026-2297/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- issue-tracking
- patch
- patch
- patch
- patch
- patch
- patch
- patch
- http://www.openwall.com/lists/oss-security/2026/03/05/6 url