Home / Python Software Foundation / CPython / CVE-2024-4030
CVE-2024-4030: is it exploited, and which versions of Python Software Foundation CPython are affected and fixed?
CVE-2024-4030 is an insecure default permissions vulnerability in Python Software Foundation CPython. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 11:08 UTC). Affected: CPython before 3.8.20, CPython from 3.9.0 before 3.9.20, CPython from 3.10.0 before 3.10.15 and 3 more (CVE record by PSF). Fixed in 3.8.20, 3.9.20, 3.10.15, 3.11.10 and 2 more (CVE record by PSF). Severity: High (7.1, CVSS 3.1, from CISA-ADP).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 11:08 UTC, CVE record November 19, 2026, 07:12 UTC and NVD November 19, 2026, 07:30 UTC.
What is CVE-2024-4030?
tempfile.mkdtemp() may be readable and writeable by all users on Windows
On Windows a directory returned by tempfile.mkdtemp() would not always have permissions set to restrict reading and writing to the temporary directory by other users, instead usually inheriting the correct permissions from the default location. Alternate configurations or users without a profile directory may not have the intended permissions. If you’re not using Windows or haven’t changed the temporary directory location then you aren’t affected by this vulnerability. On other platforms the returned directory is consistently readable and writable only by the current user. This issue was caused by Python not supporting Unix permissions on Windows. The fix adds support for Unix “700” for the mkdir function on Windows which is used by mkdtemp() to ensure the newly created directory has the proper permissions.
From the CVE record by PSF, last updated September 7, 2024, 02:44 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| Python Software Foundation | CPython Windows | before 3.8.20 from 3.9.0 before 3.9.20 from 3.10.0 before 3.10.15 from 3.11.0 before 3.11.10 from 3.12.0 before 3.12.4 from 3.13.0a1 before 3.13.0b1 | 3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.4, 3.13.0b1 |
As the CVE record by PSF states it, last updated September 7, 2024. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
How severe is CVE-2024-4030?
| Score | Version | Vector | Source |
|---|---|---|---|
| High 7.1 | CVSS 3.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N | CISA-ADP |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2024-4030 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: no; technical impact: total (CISA ADP, May 8, 2024)
- EPSS
- 0.30% probability of exploitation activity in the next 30 days, percentile 24.5 (FIRST EPSS, scores of December 2, 2026)
What kind of flaw is it?
- CWE-276 Incorrect Default Permissions
Where are the vendor advisories and references?
- https://mail.python.org/archives/list/[email protected]/thread/PRGS5OR3N3PNPT4BMV2VAGN5GMUI5636/ vendor-advisory
- https://github.com/python/cpython/issues/118486 issue-tracking
- https://github.com/python/cpython/commit/81939dad77001556c527485d31a2d0f4a759033e patch
- https://github.com/python/cpython/commit/8ed546679524140d8282175411fd141fe7df070d patch
- https://github.com/python/cpython/commit/35c799d79177b962ddace2fa068101465570a29a patch
- https://github.com/python/cpython/commit/5130731c9e779b97d00a24f54cdce73ce9975dfd patch
- https://github.com/python/cpython/commit/66f8bb76a15e64a1bb7688b177ed29e26230fdee patch
- https://github.com/python/cpython/commit/6d0850c4c8188035643586ab4d8ec2468abd699e patch
- https://github.com/python/cpython/commit/91e3669e01245185569d09e9e6e11641282971ee patch
- https://github.com/python/cpython/commit/94591dca510c796c7d40e9b4167ea56f2fdf28ca patch
- https://github.com/python/cpython/commit/c8f868dc52f98011d0f9b459b6487920bfb0ac4d patch
- https://github.com/python/cpython/commit/d86b49411753bf2c83291e3a14ae43fefded2f84 patch
- https://github.com/python/cpython/commit/e1dfa978b1ad210d551385ad8073ec6154f53763 patch
- https://github.com/python/cpython/commit/eb29e2f5905da93333d1ce78bc98b151e763ff46 patch
- https://security.netapp.com/advisory/ntap-20240705-0005/
Who found and reported it?
- Aobo Wang (finder)
As published in the CVE record; contact details are removed.
When was it published, and where is the official record?
- Reserved
- April 22, 2024
- Published
- May 7, 2024, 21:02 UTC
- CVE record updated
- September 7, 2024, 02:44 UTC by PSF
- NVD
- Deferred, last modified June 17, 2026, 08:00 UTC
- Last checked
- CVE list November 19, 2026, 07:12 UTC; NVD November 19, 2026, 07:30 UTC; KEV December 3, 2026, 11:08 UTC; EPSS December 2, 2026
- Official record
- cve.org · NVD
What other CVEs affect CPython?
- Nov 23, 2026CVE-2026-107784 Python Software Foundation CPython: path traversal (reading or writing files outside the intended folder)
- Nov 12, 2026CVE-2026-16052 Python Software Foundation CPython: injection
- Nov 10, 2026CVE-2026-115559 Python Software Foundation CPython: sensitive data sent in clear text
- Nov 10, 2026CVE-2026-115791 Python Software Foundation CPython: inclusion of code from an untrusted source
- Nov 9, 2026CVE-2026-124249 Python Software Foundation CPython: origin not validated
- Nov 9, 2026CVE-2026-19552 Python Software Foundation CPython: improper certificate validation
- Nov 6, 2026CVE-2026-119170 Python Software Foundation CPython: protection mechanism failure
- Oct 29, 2026CVE-2026-116566 Python Software Foundation CPython: improper Neutralization of Null Byte or NUL Character
Questions about CVE-2024-4030
Is CVE-2024-4030 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 11:08 UTC. FIRST's EPSS gives it a 0.30% chance of exploitation activity in the next 30 days (scores of December 2, 2026).
Which versions of Python Software Foundation CPython are affected by CVE-2024-4030?
CPython before 3.8.20, CPython from 3.9.0 before 3.9.20, CPython from 3.10.0 before 3.10.15, CPython from 3.11.0 before 3.11.10, CPython from 3.12.0 before 3.12.4 and CPython from 3.13.0a1 before 3.13.0b1, per the CVE record by PSF. The tables above give every range the sources list.
Which version fixes CVE-2024-4030?
3.8.20, 3.9.20, 3.10.15, 3.11.10, 3.12.4 and 3.13.0b1, per the CVE record by PSF. Check the vendor's advisory before you rely on it.
How severe is CVE-2024-4030?
High (7.1, CVSS 3.1, from CISA-ADP). The severity table above shows each score with its source.
Where is the official record of CVE-2024-4030?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.