{"id":"CVE-2026-2297","published":"2026-03-04T22:10:43Z","modified":"2026-08-13T00:28:17Z","title":"SourcelessFileLoader does not use io.open_code()","vendor":"Python Software Foundation","product":"CPython","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.7,"severity":"MEDIUM","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0022,"percentile":0.12814,"provenance":"source"},"cwes":[{"id":"CWE-668","name":"Exposure of Resource to Wrong Sphere"}],"references":[{"url":"https://github.com/python/cpython/issues/145506","tags":["issue-tracking"]},{"url":"https://github.com/python/cpython/pull/145507","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/482d6f8bdba9da3725d272e8bb4a2d25fb6a603e","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/a51b1b512de1d56b3714b65628a2eae2b07e535e","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/e58e9802b9bec5cdbf48fc9bf1da5f4fda482e86","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/69ddd9bb2cc4bd69b1565647c18659c6a789ccd9","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/876858c9f65d9ab656c7fa639f268ce7856d89dd","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/c70adad78caeeea33f92f560ecb93331ca11bf66","tags":["patch"]},{"url":"http://www.openwall.com/lists/oss-security/2026/03/05/6","tags":[]}],"priority":{"score":6.6,"factors":[{"name":"EPSS percentile","points":2.56},{"name":"CVSS severity","points":3.99}]},"vendorSlug":"python-software-foundation","affectedVersions":[{"vendor":"Python Software Foundation","product":"CPython","versions":["< 3.10.21",">= 3.11.0, < 3.11.16",">= 3.12.0, < 3.12.14",">= 3.13.0, < 3.13.13",">= 3.14.0, < 3.14.4",">= 3.15.0a1, < 3.15.0a7"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-03-12T14:58:41.472003Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-9498","exploited":false,"provenance":"source"}}