Skip to content
CVE PROGRAM SOURCE RECORD5.7 Medium

CVE-2026-2297

SourcelessFileLoader does not use io.open_code()

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 products

Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.

Python Software Foundation CPython

Default version status: unaffected

  • 0 to < 3.10.21affected
  • 3.11.0 to < 3.11.16affected
  • 3.12.0 to < 3.12.14affected
  • 3.13.0 to < 3.13.13affected
  • 3.14.0 to < 3.14.4affected
  • 3.15.0a1 to < 3.15.0a7affected

References