{"api_version":"1","generated_at":"2026-10-26T07:59:41+00:00","cve":"CVE-2026-12345","urls":{"html":"https://cve.report/CVE-2026-12345","api":"https://cve.report/api/cve/CVE-2026-12345.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-12345","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-12345"},"summary":{"title":"Race condition in tempfile.TemporaryDirectory cleanup allows deleting files outside the temporary directory","description":"The cleanup of tempfile.TemporaryDirectory is vulnerable to a race condition. An attacker who can modify the tree during cleanup can replace a directory with a symbolic link, causing files outside of the temporary directory to be deleted or have their permissions and file flags reset, with the privileges of the process performing the cleanup. Note that platforms where shutil.rmtree.avoids_symlink_attacks is false, remain affected, and file flags may still be reset outside of the tree on all platforms.","state":"PUBLISHED","assigner":"PSF","published_at":"2026-09-29 18:17:14","updated_at":"2026-10-26 01:17:15"},"problem_types":["CWE-59","CWE-59 CWE-59 Improper Link Resolution Before File Access ('Link Following')"],"metrics":[{"version":"4.0","source":"cna@python.org","type":"Secondary","score":"5.9","severity":"MEDIUM","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","data":{"version":"4.0","vectorString":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","baseScore":5.9,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}},{"version":"4.0","source":"CNA","type":"CVSS","score":"5.9","severity":"MEDIUM","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N","data":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"LOCAL","baseScore":5.9,"baseSeverity":"MEDIUM","exploitMaturity":"NOT_DEFINED","privilegesRequired":"NONE","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:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"}}],"references":[{"url":"https://github.com/python/cpython/commit/c39b52d00b42200aaadff679e2fe3f1006d57c58","name":"https://github.com/python/cpython/commit/c39b52d00b42200aaadff679e2fe3f1006d57c58","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/commit/5c20517a4fc56683efe63a7751020db9573f538d","name":"https://github.com/python/cpython/commit/5c20517a4fc56683efe63a7751020db9573f538d","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/commit/06ef3d43fdaf4da97af12fa694b4886092c4b970","name":"https://github.com/python/cpython/commit/06ef3d43fdaf4da97af12fa694b4886092c4b970","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/commit/458e7134a5af7f86aee9d21b51cf499b41aa4420","name":"https://github.com/python/cpython/commit/458e7134a5af7f86aee9d21b51cf499b41aa4420","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/commit/58ed0259cae509a19138795df302fe60b544dc74","name":"https://github.com/python/cpython/commit/58ed0259cae509a19138795df302fe60b544dc74","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/pull/157580","name":"https://github.com/python/cpython/pull/157580","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/commit/0478b52788117db4b831b3efd648f56b777628aa","name":"https://github.com/python/cpython/commit/0478b52788117db4b831b3efd648f56b777628aa","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/issues/157579","name":"https://github.com/python/cpython/issues/157579","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/python/cpython/commit/e1f3590f155c6d66007e958c98c9d69316551993","name":"https://github.com/python/cpython/commit/e1f3590f155c6d66007e958c98c9d69316551993","refsource":"cna@python.org","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"http://www.openwall.com/lists/oss-security/2026/09/29/40","name":"http://www.openwall.com/lists/oss-security/2026/09/29/40","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-12345","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12345","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Python Software Foundation","product":"CPython","version":"affected 3.12.15 python","platforms":[]},{"source":"CNA","vendor":"Python Software Foundation","product":"CPython","version":"affected 3.13.0 3.13.18 python","platforms":[]},{"source":"CNA","vendor":"Python Software Foundation","product":"CPython","version":"affected 3.14.0 3.14.9 python","platforms":[]},{"source":"CNA","vendor":"Python Software Foundation","product":"CPython","version":"affected 3.15.0a1 3.15.0rc3 python","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[{"source":"CNA","value":"Bitshift (https://github.com/TheShiftedBit)","lang":"en"},{"source":"CNA","value":"Stan Ulbrych (https://github.com/StanFromIreland)","lang":"en"},{"source":"CNA","value":"Petr Viktorin (https://github.com/encukou)","lang":"en"}],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2026","cve_id":"12345","cve":"CVE-2026-12345","epss":"0.001800000","percentile":"0.069470000","score_date":"2026-10-11","updated_at":"2026-10-12 00:13:20"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"adp":[{"metrics":[{"other":{"content":{"id":"CVE-2026-12345","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","timestamp":"2026-09-29T18:38:00.590353Z","version":"2.0.3"},"type":"ssvc"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-59","description":"CWE-59 Improper Link Resolution Before File Access ('Link Following')","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2026-09-29T18:38:55.324Z","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP"},"title":"CISA ADP Vulnrichment"},{"providerMetadata":{"dateUpdated":"2026-09-29T21:07:55.567Z","orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE"},"references":[{"url":"http://www.openwall.com/lists/oss-security/2026/09/29/40"}],"title":"CVE Program Container"}],"cna":{"affected":[{"defaultStatus":"unaffected","modules":["tempfile"],"product":"CPython","repo":"https://github.com/python/cpython","vendor":"Python Software Foundation","versions":[{"lessThan":"3.12.15","status":"affected","version":"0","versionType":"python"},{"lessThan":"3.13.18","status":"affected","version":"3.13.0","versionType":"python"},{"lessThan":"3.14.9","status":"affected","version":"3.14.0","versionType":"python"},{"lessThan":"3.15.0rc3","status":"affected","version":"3.15.0a1","versionType":"python"}]}],"credits":[{"lang":"en","type":"reporter","value":"Bitshift (https://github.com/TheShiftedBit)"},{"lang":"en","type":"coordinator","value":"Stan Ulbrych (https://github.com/StanFromIreland)"},{"lang":"en","type":"remediation developer","value":"Petr Viktorin (https://github.com/encukou)"}],"descriptions":[{"lang":"en","supportingMedia":[{"type":"text/html","value":"The cleanup of tempfile.TemporaryDirectory is vulnerable to a race condition. An attacker who can modify the tree during cleanup can replace a directory with a symbolic link, causing files outside of the temporary directory to be deleted or have their permissions and file flags reset, with the privileges of the process performing the cleanup. Note that platforms where shutil.rmtree.avoids_symlink_attacks is false, remain affected, and file flags may still be reset outside of the tree on all platforms."}],"value":"The cleanup of tempfile.TemporaryDirectory is vulnerable to a race condition. An attacker who can modify the tree during cleanup can replace a directory with a symbolic link, causing files outside of the temporary directory to be deleted or have their permissions and file flags reset, with the privileges of the process performing the cleanup. Note that platforms where shutil.rmtree.avoids_symlink_attacks is false, remain affected, and file flags may still be reset outside of the tree on all platforms."}],"metrics":[{"cvssV4_0":{"Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","Safety":"NOT_DEFINED","attackComplexity":"LOW","attackRequirements":"PRESENT","attackVector":"LOCAL","baseScore":5.9,"baseSeverity":"MEDIUM","exploitMaturity":"NOT_DEFINED","privilegesRequired":"NONE","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:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0","vulnAvailabilityImpact":"HIGH","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","vulnerabilityResponseEffort":"NOT_DEFINED"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"providerMetadata":{"dateUpdated":"2026-10-26T00:36:23.425Z","orgId":"28c92f92-d60d-412d-b760-e73465c3df22","shortName":"PSF"},"references":[{"tags":["patch"],"url":"https://github.com/python/cpython/pull/157580"},{"tags":["issue-tracking"],"url":"https://github.com/python/cpython/issues/157579"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/5c20517a4fc56683efe63a7751020db9573f538d"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/458e7134a5af7f86aee9d21b51cf499b41aa4420"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/e1f3590f155c6d66007e958c98c9d69316551993"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/06ef3d43fdaf4da97af12fa694b4886092c4b970"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/58ed0259cae509a19138795df302fe60b544dc74"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/0478b52788117db4b831b3efd648f56b777628aa"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/c39b52d00b42200aaadff679e2fe3f1006d57c58"}],"source":{"discovery":"UNKNOWN"},"title":"Race condition in tempfile.TemporaryDirectory cleanup allows deleting files outside the temporary directory","x_generator":{"engine":"cvelib 1.8.0"}}},"cveMetadata":{"assignerOrgId":"28c92f92-d60d-412d-b760-e73465c3df22","assignerShortName":"PSF","cveId":"CVE-2026-12345","datePublished":"2026-09-29T17:46:01.811Z","dateReserved":"2026-06-15T19:08:01.497Z","dateUpdated":"2026-10-26T00:36:23.425Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-09-29 18:17:14","lastModifiedDate":"2026-10-26 01:17:15","problem_types":["CWE-59","CWE-59 CWE-59 Improper Link Resolution Before File Access ('Link Following')"],"metrics":{"cvssMetricV40":[{"source":"cna@python.org","type":"Secondary","cvssData":{"version":"4.0","vectorString":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","baseScore":5.9,"baseSeverity":"MEDIUM","attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-09-29T18:38:00.590353Z","id":"CVE-2026-12345","options":[{"exploitation":"none"},{"automatable":"no"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"12345","Ordinal":"1","Title":"Race condition in tempfile.TemporaryDirectory cleanup allows del","CVE":"CVE-2026-12345","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"12345","Ordinal":"1","NoteData":"The cleanup of tempfile.TemporaryDirectory is vulnerable to a race condition. An attacker who can modify the tree during cleanup can replace a directory with a symbolic link, causing files outside of the temporary directory to be deleted or have their permissions and file flags reset, with the privileges of the process performing the cleanup. Note that platforms where shutil.rmtree.avoids_symlink_attacks is false, remain affected, and file flags may still be reset outside of the tree on all platforms.","Type":"Description","Title":"Race condition in tempfile.TemporaryDirectory cleanup allows del"}]}}}