{"id":"CVE-2026-2297","state":"PUBLISHED","title":"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.","publishedAt":"2026-03-04T22:10:43.297Z","updatedAt":"2026-08-13T00:28:17.928Z","severity":{"score":5.7,"label":"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","source":"PSF"},"assigner":"PSF","products":["Python Software Foundation CPython"],"affected":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.10.21","versionType":"python"},{"version":"3.11.0","status":"affected","lessThan":"3.11.16","versionType":"python"},{"version":"3.12.0","status":"affected","lessThan":"3.12.14","versionType":"python"},{"version":"3.13.0","status":"affected","lessThan":"3.13.13","versionType":"python"},{"version":"3.14.0","status":"affected","lessThan":"3.14.4","versionType":"python"},{"version":"3.15.0a1","status":"affected","lessThan":"3.15.0a7","versionType":"python"}],"repo":"https://github.com/python/cpython"}],"references":["https://github.com/python/cpython/issues/145506","https://github.com/python/cpython/pull/145507","https://github.com/python/cpython/commit/482d6f8bdba9da3725d272e8bb4a2d25fb6a603e","https://github.com/python/cpython/commit/a51b1b512de1d56b3714b65628a2eae2b07e535e","https://github.com/python/cpython/commit/e58e9802b9bec5cdbf48fc9bf1da5f4fda482e86","https://github.com/python/cpython/commit/69ddd9bb2cc4bd69b1565647c18659c6a789ccd9","https://github.com/python/cpython/commit/876858c9f65d9ab656c7fa639f268ce7856d89dd","https://github.com/python/cpython/commit/c70adad78caeeea33f92f560ecb93331ca11bf66","http://www.openwall.com/lists/oss-security/2026/03/05/6"],"weaknesses":["CWE-668"],"ingestedAt":"2026-10-29T20:11:31.369Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/2xxx/CVE-2026-2297.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-2297","state":"PUBLISHED","datePublished":"2026-03-04T22:10:43.297Z","dateUpdated":"2026-08-13T00:28:17.928Z","assignerShortName":"PSF","assignerOrgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateReserved":"2026-02-10T16:26:08.298Z"},"containers":{"cna":{"title":"SourcelessFileLoader does not use io.open_code()","descriptions":[{"lang":"en","value":"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":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.10.21","versionType":"python"},{"version":"3.11.0","status":"affected","lessThan":"3.11.16","versionType":"python"},{"version":"3.12.0","status":"affected","lessThan":"3.12.14","versionType":"python"},{"version":"3.13.0","status":"affected","lessThan":"3.13.13","versionType":"python"},{"version":"3.14.0","status":"affected","lessThan":"3.14.4","versionType":"python"},{"version":"3.15.0a1","status":"affected","lessThan":"3.15.0a7","versionType":"python"}],"repo":"https://github.com/python/cpython"}],"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"]}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"LOCAL","baseScore":5.7,"baseSeverity":"MEDIUM","exploitMaturity":"NOT_DEFINED","privilegesRequired":"LOW","providerUrgency":"NOT_DEFINED","subAvailabilityImpact":"NONE","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","userInteraction":"NONE","valueDensity":"NOT_DEFINED","vectorString":"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","version":"4.0","vulnAvailabilityImpact":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"providerMetadata":{"shortName":"PSF","orgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateUpdated":"2026-08-13T00:28:17.928Z"},"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 0.5.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"http://www.openwall.com/lists/oss-security/2026/03/05/6"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2026-03-05T18:35:25.713Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-03-12T14:58:41.472003Z","id":"CVE-2026-2297","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-668","type":"CWE","lang":"en","description":"CWE-668 Exposure of Resource to Wrong Sphere"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-03-12T14:58:46.051Z"}}]}}}