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

Published Mar 4, 2026
·
Updated

SourcelessFileLoader does not use io.opencode()

Other sources

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.opencode() to read the .pyc files. sys.audit handlers for this audit event therefore do not fire.

Red Hat

Affected Software

3 affected componentsFixes available
Python CPython
Microsoft azl3 python3 3.12.9-13<3.12.9-14
3.12.9-14
Microsoft azl3 python3 3.12.9-14<3.12.9-14
3.12.9-14

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 3.12.9-14

Event History

Mar 4, 2026
CVE Published
via MITRE·10:10 PM
Data Sourced
via MITRE·10:10 PM
Description
Data Sourced
via Red Hat·11:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·11:16 PM
DescriptionSeverityWeakness
Mar 7, 2026
Data Sourced
via Microsoft·09:04 AM
DescriptionSeverityWeaknessAffected Software
Updated
via Microsoft·09:04 AM
DescriptionSeverity
Updated
via Microsoft·09:04 AM
Affected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-2297?

CVE-2026-2297 has been classified as a moderate severity vulnerability affecting Python CPython.

2

How do I fix CVE-2026-2297?

To fix CVE-2026-2297, update your Python CPython installation to the latest version where the vulnerability has been patched.

3

What software is affected by CVE-2026-2297?

CVE-2026-2297 affects Python CPython without specific version restrictions.

4

What type of vulnerability is CVE-2026-2297?

CVE-2026-2297 is a vulnerability related to improper handling of legacy .pyc files in the SourcelessFileLoader module.

5

Does CVE-2026-2297 affect all users of Python CPython?

Yes, CVE-2026-2297 potentially affects all users of Python CPython who utilize the affected modules for loading source code.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203