CVE-2026-2297 PUBLISHED

SourcelessFileLoader does not use io.open_code()

Assigner: PSF
Reserved: 10.02.2026 Published: 04.03.2026 Updated: 04.03.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.

Metrics

CVSS 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
CVSS Score: 5.7

Product Status

Vendor Python Software Foundation
Product CPython
Versions Default: unaffected
  • affected from 0 to 3.15.0 (excl.)

References