CVE-2026-12345: Race condition in tempfile.TemporaryDirectory cleanup allows deleting files outside the temporary directory
Noroxi assessment
Priority: Monitor (action score 23/100)
- Public proof-of-concept code exists (GitHub); there is no record of exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.34% (FIRST EPSS).
- Someone with local access to the system can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: Python Software Foundation CPython 3.12.15, 3.13.18, 3.14.9; azl3 python3 3.12.14-2 on Azure Linux 3.0 3.12.16-1.
Low priority for now. Upgrade to Python Software Foundation CPython 3.12.15, 3.13.18, 3.14.9; azl3 python3 3.12.14-2 on Azure Linux 3.0 3.12.16-1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Sep 29, 2026
- Updated
- Oct 26, 2026
- EPSS
- 0.3% · 28th percentile
- CWE
- CWE-59
Report tools
Action score
23
Monitor
Low priority for now.
- CVSS
- 23 / 40 · 5.9 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.3%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · PSF
- 5.9
- NVD has not scored this yet; the score shown is the CNA’s.
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
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- Proof of concept exists, no weaponized module
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
—
Versions reported by the vendor
Affected version ranges reported by the assigning authority (PSF). Independent of NVD's CPE analysis and usually ahead of it.
Python Software Foundation CPython
- before 3.12.15affected · python
- 3.13.0 and later · before 3.13.18affected · python
- 3.14.0 and later · before 3.14.9affected · python
- 3.15.0a1 and later · before 3.15.0rc3affected · python
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | platform-python | before 3.6.8-79.el8_10.alma.1 | 3.6.8-79.el8_10.alma.1 |
| AlmaLinux:8 | platform-python-debug | before 3.6.8-79.el8_10.alma.1 | 3.6.8-79.el8_10.alma.1 |
| AlmaLinux:8 | platform-python-devel | before 3.6.8-79.el8_10.alma.1 | 3.6.8-79.el8_10.alma.1 |
| AlmaLinux:8 | python3-idle | before 3.6.8-79.el8_10.alma.1 | 3.6.8-79.el8_10.alma.1 |
| AlmaLinux:8 | python3-libs | before 3.6.8-79.el8_10.alma.1 | 3.6.8-79.el8_10.alma.1 |
| AlmaLinux:8 | python3-test | before 3.6.8-79.el8_10.alma.1 | 3.6.8-79.el8_10.alma.1 |
| AlmaLinux:8 | python3-tkinter | before 3.6.8-79.el8_10.alma.1 | 3.6.8-79.el8_10.alma.1 |
| AlmaLinux:9 | python-unversioned-command | before 3.9.25-7.el9_8.6 | 3.9.25-7.el9_8.6 |
| AlmaLinux:9 | python3 | before 3.9.25-7.el9_8.6 | 3.9.25-7.el9_8.6 |
| AlmaLinux:9 | python3-debug | before 3.9.25-7.el9_8.6 | 3.9.25-7.el9_8.6 |
| AlmaLinux:9 | python3-devel | before 3.9.25-7.el9_8.6 | 3.9.25-7.el9_8.6 |
| AlmaLinux:9 | python3-idle | before 3.9.25-7.el9_8.6 | 3.9.25-7.el9_8.6 |
| AlmaLinux:9 | python3-libs | before 3.9.25-7.el9_8.6 | 3.9.25-7.el9_8.6 |
| AlmaLinux:9 | python3-test | before 3.9.25-7.el9_8.6 | 3.9.25-7.el9_8.6 |
| AlmaLinux:9 | python3-tkinter | before 3.9.25-7.el9_8.6 | 3.9.25-7.el9_8.6 |
| Alpine:v3.21 | python3 | before 3.12.16-r0 | 3.12.16-r0 |
| Alpine:v3.24 | python3 | before 3.14.10-r0 | 3.14.10-r0 |
| Debian:12 | pypy3 | from 0 | — |
| Debian:12 | python3.11 | from 0 | — |
| Debian:13 | python3.13 | from 0 | — |
| Debian:14 | python3.14 | before 3.14.9-1 | 3.14.9-1 |
| Debian:14 | python3.15 | before 3.15.0~rc3-1 | 3.15.0~rc3-1 |
| openSUSE:Tumbleweed | python315 | before 3.15.0-1.1 | 3.15.0-1.1 |
| Red Hat:enterprise_linux:8::appstream | platform-python | before 0:3.6.8-79.el8_10 | 0:3.6.8-79.el8_10 |
+43
Same product
python software foundation: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-115557Distrust compromised intermediate certificates in ssl module37Monitor
- CVE-2025-4517Arbitrary writes via tarfile realpath overflow37Monitor
- CVE-2026-19445Use-after-free of a server-side SSLContext when sni_callback switches contexts36Monitor
Published before and after this one in the same product
- ← EarlierCVE-2026-87910Sep 11, 2026 · tarfile hardlink fallback ignores custom extraction filter rejection via None22Monitor
- ← EarlierCVE-2026-82049Sep 14, 2026 · tarfile extraction filters allow file modification and content disclosure via hard link to symlink33Monitor
- Later →CVE-2026-19553Sep 30, 2026 · SSLContext.wrap_bio() missing validation of server_hostname parameter30Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Python Software Foundation CPython | 3.12.15 | Vendor (CNA) |
| Python Software Foundation CPython | 3.13.18 | Vendor (CNA) |
| Python Software Foundation CPython | 3.14.9 | Vendor (CNA) |
| Python Software Foundation CPython | 3.15.0rc3 | Vendor (CNA) |
| azl3 python3 3.12.14-2 on Azure Linux 3.0 | 3.12.16-1 · Release Notes | Microsoft (MSRC) |
| almalinux:platform-python | 3.6.8-79.el8_10.alma.1 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:platform-python-debug | 3.6.8-79.el8_10.alma.1 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:platform-python-devel | 3.6.8-79.el8_10.alma.1 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python-unversioned-command | 3.9.25-7.el9_8.6 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3 | 3.9.25-7.el9_8.6 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3-debug | 3.9.25-7.el9_8.6 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3-devel | 3.9.25-7.el9_8.6 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3-idle | 3.6.8-79.el8_10.alma.1 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python3-libs | 3.6.8-79.el8_10.alma.1 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python3-test | 3.6.8-79.el8_10.alma.1 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python3-tkinter | 3.6.8-79.el8_10.alma.1 · AlmaLinux:8 | Package registry (OSV) |
| alpine:python3 | 3.12.16-r0 · Alpine:v3.21 | Package registry (OSV) |
| alpine:python3 | 3.14.10-r0 · Alpine:v3.24 | Package registry (OSV) |
| debian:python3.14 | 3.14.9-1 · Debian:14 | Package registry (OSV) |
| debian:python3.15 | 3.15.0~rc3-1 · Debian:14 | Package registry (OSV) |
| opensuse:python315 | 3.15.0-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| red hat:python-unversioned-command | 0:3.14.8-1.hum1 · Red Hat:hummingbird:1 | Package registry (OSV) |
| red hat:python3 | 0:3.14.8-1.hum1 · Red Hat:hummingbird:1 | Package registry (OSV) |
| red hat:python3-debug | 0:3.14.8-1.hum1 · Red Hat:hummingbird:1 | Package registry (OSV) |
| red hat:python3-devel | 0:3.14.8-1.hum1 · Red Hat:hummingbird:1 | Package registry (OSV) |
| red hat:python3-idle | 0:3.14.8-1.hum1 · Red Hat:hummingbird:1 | Package registry (OSV) |
| red hat:python3-libs | 0:3.14.8-1.hum1 · Red Hat:hummingbird:1 | Package registry (OSV) |
| red hat:python3-test | 0:3.14.8-1.hum1 · Red Hat:hummingbird:1 | Package registry (OSV) |
| red hat:python3-tkinter | 0:3.14.8-1.hum1 · Red Hat:hummingbird:1 | Package registry (OSV) |
| red hat:python3.12 | 0:3.12.15-1.hum1 · Red Hat:hummingbird:1 | Package registry (OSV) |
+12
Exploit status
Proof of concept available
A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.
Evidence
- Proof-of-concept repository on GitHub ×1
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Proof-of-concept repository on GitHub | stars:0 | 2026-08-14 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- First PoC-47 d
- Published
- Fix recordedsame day
- TodayNov 11, 2026+42 d
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
- Bitshift (https://github.com/TheShiftedBit)reporter
- Stan Ulbrych (https://github.com/StanFromIreland)coordinator
- Petr Viktorin (https://github.com/encukou)remediation developer
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
- CVE-2026-8204915 days aparttarfile extraction filters allow file modification and content disclosure via hard link to symlink33Monitor
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- Integrity
- Availability
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- X
Weakness class (CWE)
CWE-59 · Improper Link Resolution Before File Access ('Link Following')CVSS 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
nvd-secondary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
- Obfuscated Files or Information: HTML SmugglingT1027.006
- Obfuscated Files or Information: Embedded PayloadsT1027.009
- Boot or Logon Autostart Execution:Shortcut ModificationT1547.009
- Hide Artifacts: Resource ForkingT1564.009
- Hijack Execution Flow: Executable Installer File Permissions WeaknessT1574.005
- Hijack Execution Flow: Services File Permissions WeaknessT1574.010
Change log
- Exploit maturitynone → poc
- Exploit maturity— → none
- Fix✗ → ✓
- SSVC exploitation— → none
For records you follow, these changes also arrive as notifications. →
References
Show all references (9 more)Show less
- github.com/python/cpython/commit/06ef3d43fdaf4da97af12fa694b4886092c4b970
- github.com/python/cpython/commit/458e7134a5af7f86aee9d21b51cf499b41aa4420
- github.com/python/cpython/commit/58ed0259cae509a19138795df302fe60b544dc74
- github.com/python/cpython/commit/5c20517a4fc56683efe63a7751020db9573f538d
- github.com/python/cpython/commit/c39b52d00b42200aaadff679e2fe3f1006d57c58
- github.com/python/cpython/commit/e1f3590f155c6d66007e958c98c9d69316551993
- github.com/python/cpython/issues/157579
- github.com/python/cpython/pull/157580
- www.openwall.com/lists/oss-security/2026/09/29/40
Vendor advisories and official records. Exploit/PoC links are deliberately left out.