CVE-2026-12345
Race condition in tempfile.TemporaryDirectory cleanup allows deleting files outside the temporary directory
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.
Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.
Severity and exploitation evidence
EPSS: 0.344% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.
CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T17:59:58.648Z. Public exploit availability is not used to set this status.
CVSS 4.0 · 5.9 · published by PSFCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
Assessment source · checked 2026-11-19T12:58:04.072Z
CVSS 4.0 · 5.9 · published by Ubuntu SecurityCVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N
Assessment source · checked 2026-11-19T16:55:57.387Z
Verification by field
| Field | Status | Checked at (UTC) | Source |
|---|---|---|---|
| kev | verified | 2026-11-19T17:59:58.648Z | CISA KEV |
| cvss | verified | 2026-11-19T12:58:04.072Z | CVE Program |
| epss | verified | 2026-11-19T16:04:46.239Z | FIRST EPSS |
| patches | unknown | unknown | unknown |
| affected | verified | 2026-11-19T12:58:04.072Z | CVE Program |
| lifecycle | verified | 2026-11-19T12:58:04.072Z | CVE Program |
Affected versions and configuration
Python Software Foundation CPython; modules: tempfile; default status: unaffected: 0 to < 3.12.15 [affected; scheme: python]; 3.13.0 to < 3.13.18 [affected; scheme: python]; 3.14.0 to < 3.14.9 [affected; scheme: python]; 3.15.0a1 to < 3.15.0rc3 [affected; scheme: python]
Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.
Ubuntu Security · ubuntu-package · full conditions
[
{
"name": "python3.12",
"debian": "https://tracker.debian.org/pkg/python3.12",
"source": "https://ubuntu.com/security/cve?package=python3.12",
"ubuntu": "https://packages.ubuntu.com/search?suite=all§ion=all&arch=any&searchon=sourcenames&keywords=python3.12",
"statuses": [
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "jammy"
},
{
"pocket": "security",
"status": "needs-triage",
"component": null,
"description": "",
"release_codename": "noble"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "resolute"
},
{
"pocket": "security",
"status": "needs-triage",
"component": null,
"description": "",
"release_codename": "upstream"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "stonking"
}
]
}
]Archived source JSONUbuntu Security · ubuntu-package · full conditions
[
{
"name": "python3.10",
"debian": "https://tracker.debian.org/pkg/python3.10",
"source": "https://ubuntu.com/security/cve?package=python3.10",
"ubuntu": "https://packages.ubuntu.com/search?suite=all§ion=all&arch=any&searchon=sourcenames&keywords=python3.10",
"statuses": [
{
"pocket": "security",
"status": "needs-triage",
"component": null,
"description": "",
"release_codename": "jammy"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "noble"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "resolute"
},
{
"pocket": "security",
"status": "needs-triage",
"component": null,
"description": "",
"release_codename": "upstream"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "stonking"
}
]
}
]Archived source JSONUbuntu Security · ubuntu-package · full conditions
[
{
"name": "python3.11",
"debian": "https://tracker.debian.org/pkg/python3.11",
"source": "https://ubuntu.com/security/cve?package=python3.11",
"ubuntu": "https://packages.ubuntu.com/search?suite=all§ion=all&arch=any&searchon=sourcenames&keywords=python3.11",
"statuses": [
{
"pocket": "security",
"status": "needs-triage",
"component": null,
"description": "",
"release_codename": "jammy"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "noble"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "resolute"
},
{
"pocket": "security",
"status": "needs-triage",
"component": null,
"description": "",
"release_codename": "upstream"
},
{
"pocket": "security",
"status": "DNE",
"component": null,
"description": "",
"release_codename": "stonking"
}
]
}
]Archived source JSONCVE Program · cve-json · full conditions
{
"affected": [
{
"repo": "https://github.com/python/cpython",
"vendor": "Python Software Foundation",
"modules": [
"tempfile"
],
"product": "CPython",
"versions": [
{
"status": "affected",
"version": "0",
"lessThan": "3.12.15",
"versionType": "python"
},
{
"status": "affected",
"version": "3.13.0",
"lessThan": "3.13.18",
"versionType": "python"
},
{
"status": "affected",
"version": "3.14.0",
"lessThan": "3.14.9",
"versionType": "python"
},
{
"status": "affected",
"version": "3.15.0a1",
"lessThan": "3.15.0rc3",
"versionType": "python"
}
],
"defaultStatus": "unaffected"
}
],
"additionalContainers": [
{
"title": "CISA ADP Vulnrichment",
"metrics": [
{
"other": {
"type": "ssvc",
"content": {
"id": "CVE-2026-12345",
"role": "CISA Coordinator",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "no"
},
{
"Technical Impact": "partial"
}
],
"version": "2.0.3",
"timestamp": "2026-09-29T18:38:00.590353Z"
}
}
}
],
"problemTypes": [
{
"descriptions": [
{
"lang": "en",
"type": "CWE",
"cweId": "CWE-59",
"description": "CWE-59 Improper Link Resolution Before File Access ('Link Following')"
}
]
}
],
"providerMetadata": {
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP",
"dateUpdated": "2026-09-29T18:38:55.324Z"
}
},
{
"title": "CVE Program Container",
"references": [
{
"url": "http://www.openwall.com/lists/oss-security/2026/09/29/40"
}
],
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2026-09-29T21:07:55.567Z"
}
}
]
}Archived source JSONCorrection evidence
Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.
No correction has been verified in the connected records. This does not mean the system is secure or that no vendor correction exists.
Vendor notices and operational guidance
No connected vendor notice is available for this record.
Original sources and dates
- Ubuntu SecurityConsulted: 2026-11-19T16:56:10.838ZArchived source JSON
Source publication: 2026-09-29T18:17:00.000Z
Source modification: 2026-11-17T07:27:28.723ZDocument fingerprint
a7e96485eb6cd2bc64663983404779c3757be8bf3592980bbee69311d62ac308 - Ubuntu SecurityConsulted: 2026-11-19T16:56:22.007ZArchived source JSON
Source publication: 2026-09-29T18:17:00.000Z
Source modification: 2026-11-17T07:27:28.723ZDocument fingerprint
6206a8079dd149eba02991e24fe8ac187169005cec7980e8cc30b8aa32b0bf45 - Ubuntu SecurityConsulted: 2026-11-19T16:55:57.387ZArchived source JSON
Source publication: 2026-09-29T18:17:00.000Z
Source modification: 2026-11-17T07:27:28.723ZDocument fingerprint
821da0723fecd5ee0a3abc0f653b31569394efaa6fe2db487066f90325928395 - CVE ProgramConsulted: 2026-11-19T12:58:04.072ZArchived source JSON
Source publication: 2026-09-29T17:46:01.811Z
Source modification: 2026-11-19T00:26:46.464ZDocument fingerprint
f2f8680c48f618af684090b4bddef7369ff5a75f76df4b2fb37e985f5542a5bb - CISA KEVConsulted: 2026-11-19T17:59:58.648ZArchived source JSON
Source publication: not supplied
Source modification: 2026-11-18T19:17:41.0354ZDocument fingerprint
a35fdc67c7d9802988dcfc1d3ff1198da327948d1db122ab7692ac201055ac56 - FIRST EPSSConsulted: 2026-11-19T16:04:46.239ZArchived source JSON
Source publication: not supplied
Source modification: not suppliedDocument fingerprint
3e97a4ada75ea378f864347963f9a59a694816a5cedcf76ec8635b7b082add81
Official status history
- UNKNOWN → PUBLISHED · · evidence