cve.bz

CVE-2026-12345 python software foundation cpython: Link Following

5.9 mediumEPSS 0.3%

Medium (5.9) in python software foundation cpython. EPSS 0.3% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 4.0

5.9 medium
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
EPSS
0.3% (unchanged from 0.3% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 28th percentile. Scored 2026-11-17. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-09-29. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-59 Improper Link Resolution Before File Access (Link Following)
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Awaiting analysis
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-12345 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-12345?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-12345?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-12345 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

  • python software foundation:cpython

Versions

From the CNA's record in the CVE List.

ProductAffected
Python Software Foundation CPythonbefore 3.12.15
Python Software Foundation CPythonfrom 3.13.0 before 3.13.18
Python Software Foundation CPythonfrom 3.14.0 before 3.14.9
Python Software Foundation CPythonfrom 3.15.0a1 before 3.15.0rc3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12pypy3, python3.11no fix listedDEBIAN-CVE-2026-12345
Debian13pypy3, python3.13no fix listedDEBIAN-CVE-2026-12345
Debian14pypy3no fix listedDEBIAN-CVE-2026-12345
Debian14python3.143.14.9-1DEBIAN-CVE-2026-12345
Debian14python3.153.15.0~rc3-1DEBIAN-CVE-2026-12345
Ubuntu22.04:LTSpython3.10no fix listedUBUNTU-CVE-2026-12345
Ubuntu24.04:LTSpython3.12no fix listedUBUNTU-CVE-2026-12345
Ubuntu26.04:LTS, 26.10python3.14no fix listedUBUNTU-CVE-2026-12345
UbuntuPro:14.04:LTSpython2.7, python3.4, python3.5no fix listedUBUNTU-CVE-2026-12345
UbuntuPro:16.04:LTSpython2.7, python3.5no fix listedUBUNTU-CVE-2026-12345
UbuntuPro:18.04:LTSpython2.7, python3.6, python3.7 and 1 moreno fix listedUBUNTU-CVE-2026-12345
UbuntuPro:20.04:LTSpython2.7, python3.8, python3.9no fix listedUBUNTU-CVE-2026-12345
UbuntuPro:22.04:LTSpython2.7, python3.11no fix listedUBUNTU-CVE-2026-12345
Red Hatenterprise_linux:8::appstreampython3-idle, python3-test, platform-python and 5 more0:3.6.8-79.el8_10RHSA-2026:85239
Red Hatenterprise_linux:8::baseospython3, python3-libs, python3-test and 3 more0:3.6.8-79.el8_10RHSA-2026:85239
Red Hatenterprise_linux:9::appstreampython3-devel, python3-tkinter, python3.9-debuginfo and 2 more0:3.9.25-14.el9_9RHSA-2026:98511
Red Hatenterprise_linux:9::appstreampython3-devel, python3-tkinter, python3.9-debuginfo and 2 more0:3.9.25-7.el9_8.6RHSA-2026:89742
Red Hatenterprise_linux:9::baseospython3, python3.9, python3-libs and 2 more0:3.9.25-14.el9_9RHSA-2026:98511
Red Hatenterprise_linux:9::baseospython3, python3.9, python3-libs and 2 more0:3.9.25-7.el9_8.6RHSA-2026:89742
Red Hatenterprise_linux:9::crbpython3, python3-idle, python3-test and 4 more0:3.9.25-14.el9_9RHSA-2026:98511
Red Hatenterprise_linux:9::crbpython3, python3-idle, python3-test and 4 more0:3.9.25-7.el9_8.6RHSA-2026:89742
Red Hatenterprise_linux:10.3python3, python3.12, python3-idle and 8 more0:3.12.16-2.el10_3RHSA-2026:98615
Red Hathummingbird:1python3, python3.14, python3-idle and 13 more0:3.14.8-1.hum1RHSA-2026:74870
Red Hathummingbird:1python3.12, python3.12-idle, python3.12-libs and 4 more0:3.12.15-1.hum1RHSA-2026:74922
Red Hathummingbird:1python3.13, python3.13-idle, python3.13-libs and 6 more0:3.13.16-1.hum1RHSA-2026:75119
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 11 morepython3, python3-core3.6.15-150300.10.134.1SUSE-SU-2026:5251-1
SUSELinux Enterprise Module for Development Tools 15 SP7python3-core3.6.15-150300.10.134.1SUSE-SU-2026:5251-1
openSUSETumbleweedpython3153.15.0-1.1openSUSE-SU-2026:12125-1
AlmaLinux8python3-idle, python3-libs, python3-test and 4 more3.6.8-79.el8_10.alma.1ALSA-2026:85239
AlmaLinux9python3, python3-idle, python3-libs and 5 more3.9.25-7.el9_8.6ALSA-2026:89742
AlmaLinux10python3, python3-idle, python3-libs and 5 more3.12.16-2.el10_3ALSA-2026:98615
Rocky Linux8python30:3.6.8-79.el8_10.rocky.0RLSA-2026:85239
Rocky Linux9python3.90:3.9.25-7.el9_8.6RLSA-2026:89742
Rocky Linux10python3, python3-idle, python3-libs and 7 more0:3.12.16-2.el10_3RLSA-2026:98615
Alpinev3.21, v3.22, v3.23python33.12.16-r0ALPINE-CVE-2026-12345
Alpinev3.24python33.14.10-r0ALPINE-CVE-2026-12345
Azure Linux3python33.12.16-1AZL-105684
Azure Linux3tensorflowno fix listedAZL-105912
Alpaquita25python33.12.15-r1BELL-CVE-2026-12345
Alpaquitastreampython33.14.8-r4BELL-CVE-2026-12345
BellSoft Hardened Containers25python33.12.15-r1BELL-CVE-2026-12345
BellSoft Hardened Containersstreampython33.14.8-r4BELL-CVE-2026-12345

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita · BellSoft Hardened Containers.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability is rated as Moderate severity rather than Important because successful exploitation requires local system access, existing permissions to manipulate the target directory structure, and winning a narrow timing window during deletion. In Red Hat Enterprise Linux environments, standard temporary directory creation restricts access to the executing user, significantly limiting exposure to unprivileged local attackers. Applications running with elevated privileges that operate on shared or world-writable directories are at risk of unintended target file removal or permission tampering.

Red Hat's mitigation

To mitigate this issue, ensure kernel symlink protection is enabled (active by default in RHEL) by verifying sysctl fs.protected_symlinks is set to 1. Additionally, restrict exposure on shared systems by setting the TMPDIR environment variable to a secure, user-private directory rather than a public shared path (e.g., export TMPDIR=/path/to/private_tmp).

ProductPackageStateAdvisory
Red Hat Enterprise Linux 8python3-0:3.6.8-79.el8_10Fixed 2026-10-19RHSA-2026:85239
Red Hat Enterprise Linux 9python3.9-0:3.9.25-7.el9_8.6Fixed 2026-10-26RHSA-2026:89742
Red Hat Discovery 2discovery/discovery-server-rhel9:1793734080Fixed 2026-11-04RHSA-2026:94802
Red Hat Discovery 2discovery/discovery-ui-rhel9:1793733716Fixed 2026-11-04RHSA-2026:94802
Red Hat Hardened Imagespython3-14-main-3.14.8-1.hum1Fixed 2026-10-02RHSA-2026:74870
Red Hat Hardened Imagespython3-12-main-3.12.15-1.hum1Fixed 2026-10-02RHSA-2026:74922
Red Hat Hardened Imagespython3-13-main-3.13.16-1.hum1Fixed 2026-10-03RHSA-2026:75119
Red Hat Enterprise Linux 10python3.12Affected
Red Hat Enterprise Linux 10python3.14Fix deferred
Red Hat Enterprise Linux 6pythonOut of support scope
Red Hat Enterprise Linux 7pythonFix deferred
Red Hat Enterprise Linux 7python3Fix deferred
Red Hat Enterprise Linux 8python3.12Fix deferred
Red Hat Enterprise Linux 8python36:3.6/python36Fix deferred
Red Hat Enterprise Linux 9python3.12Fix deferred
Red Hat Enterprise Linux 9python3.14Fix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3rhelai3/bootc-aws-cuda-rhel9Fix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3rhelai3/bootc-azure-cuda-rhel9Fix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3rhelai3/bootc-azure-rocm-rhel9Fix deferred
Red Hat Enterprise Linux AI (RHEL AI) 3rhelai3/bootc-cuda-rhel9Fix deferred
8 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-12345.

GitHub PoC (unverified)

Repositories on GitHub named after this CVE. Nobody has checked them and they are not scanned: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it.

  • zahidec0de/CVE-2026-12345-poc 0 stars, Python, created
    Proof of Concept (PoC) for CVE-2026-64638, a reflected XSS in WordPress Core < 7.0.3.

Attack patterns (CAPEC)

  • CAPEC-17 Using Malicious Files Likelihood: High · Severity: Very High
  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-132 Symlink Attack Likelihood: Low · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON