CVE-2024-4030: tempfile.mkdtemp() may be readable and writeable by all users on Windows
Noroxi assessment
Priority: Monitor (action score 28/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.30% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: Python Software Foundation CPython 3.10.15, 3.11.10, 3.12.4.
Low priority for now. Upgrade to Python Software Foundation CPython 3.10.15, 3.11.10, 3.12.4 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
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.
- Published
- May 7, 2024
- Updated
- Jun 17, 2026
- EPSS
- 0.3% · 22th percentile
- CWE
- CWE-276
Report tools
Action score
28
Monitor
Low priority for now.
- CVSS
- 28 / 40 · 7.1 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.3%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi 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.
| Vendor | Product | CPE |
|---|---|---|
| python | cpython | cpe:2.3:a:python:cpython |
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.8.20affected · python
- 3.9.0 and later · before 3.9.20affected · python
- 3.10.0 and later · before 3.10.15affected · python
- 3.11.0 and later · before 3.11.10affected · python
- 3.12.0 and later · before 3.12.4affected · python
- 3.13.0a1 and later · before 3.13.0b1affected · python
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| openSUSE:Leap 15.6 | python312 | before 3.12.4-150600.3.3.1 | 3.12.4-150600.3.3.1 |
| openSUSE:Leap 15.6 | python312-core | before 3.12.4-150600.3.3.1 | 3.12.4-150600.3.3.1 |
| openSUSE:Leap 15.6 | python312-documentation | before 3.12.4-150600.3.3.1 | 3.12.4-150600.3.3.1 |
| openSUSE:Tumbleweed | python310 | before 3.10.15-1.1 | 3.10.15-1.1 |
| openSUSE:Tumbleweed | python311 | before 3.11.9-7.1 | 3.11.9-7.1 |
| openSUSE:Tumbleweed | python312 | before 3.12.5-1.1 | 3.12.5-1.1 |
| openSUSE:Tumbleweed | python38 | before 3.8.20-1.1 | 3.8.20-1.1 |
| openSUSE:Tumbleweed | python39 | before 3.9.20-1.1 | 3.9.20-1.1 |
| SUSE:Linux Enterprise Module for Python 3 15 SP6 | python312 | before 3.12.4-150600.3.3.1 | 3.12.4-150600.3.3.1 |
| SUSE:Linux Enterprise Module for Python 3 15 SP6 | python312-core | before 3.12.4-150600.3.3.1 | 3.12.4-150600.3.3.1 |
| SUSE:Linux Micro 6.0 | python311 | before 3.11.11-1.1 | 3.11.11-1.1 |
| SUSE:Linux Micro 6.0 | python311-core | before 3.11.11-1.1 | 3.11.11-1.1 |
| SUSE:Linux Micro 6.1 | python311 | before 3.11.12-slfo.1.1_1.1 | 3.11.12-slfo.1.1_1.1 |
| SUSE:Linux Micro 6.1 | python311-core | before 3.11.12-slfo.1.1_1.1 | 3.11.12-slfo.1.1_1.1 |
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-2023-6597Mar 19, 2024 · An issue was found in the CPython `tempfile.TemporaryDirectory` class affecting versions 3.12.1, 3.11.7, 3.10.13, 3.9.18, and 3.8.18 and pri31Monitor
- ← EarlierCVE-2024-0450Mar 19, 2024 · Quoted zip-bomb protection for zipfile24Monitor
- Later →CVE-2024-4032Jun 17, 2024 · Incorrect IPv4 and IPv6 private ranges30Monitor
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.10.15 | Vendor (CNA) |
| Python Software Foundation CPython | 3.11.10 | Vendor (CNA) |
| Python Software Foundation CPython | 3.12.4 | Vendor (CNA) |
| Python Software Foundation CPython | 3.13.0b1 | Vendor (CNA) |
| Python Software Foundation CPython | 3.8.20 | Vendor (CNA) |
| Python Software Foundation CPython | 3.9.20 | Vendor (CNA) |
| opensuse:python310 | 3.10.15-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:python311 | 3.11.9-7.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:python312 | 3.12.4-150600.3.3.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:python312-core | 3.12.4-150600.3.3.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:python312-documentation | 3.12.4-150600.3.3.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:python38 | 3.8.20-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:python39 | 3.9.20-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| suse:python311 | 3.11.11-1.1 · SUSE:Linux Micro 6.0 | Package registry (OSV) |
| suse:python311-core | 3.11.11-1.1 · SUSE:Linux Micro 6.0 | Package registry (OSV) |
| suse:python312 | 3.12.4-150600.3.3.1 · SUSE:Linux Enterprise Module for Python 3 15 SP6 | Package registry (OSV) |
| suse:python312-core | 3.12.4-150600.3.3.1 · SUSE:Linux Enterprise Module for Python 3 15 SP6 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
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.
No dated events beyond publication.
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.
- python/cpythoncommit 8ed5466
- python/cpythoncommit 35c799d
- python/cpythoncommit 5130731
- python/cpythoncommit 66f8bb7
- python/cpythoncommit 6d0850c
- python/cpythoncommit 81939da
- python/cpythoncommit 91e3669
- python/cpythoncommit 94591dc
- python/cpythoncommit c8f868d
- python/cpythoncommit d86b494
- python/cpythoncommit e1dfa97
- python/cpythoncommit eb29e2f
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
- Aobo Wangfinder
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
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.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- none
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- None
Weakness class (CWE)
CWE-276 · Incorrect Default PermissionsCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
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)
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (14 more)Show less
- github.com/python/cpython/commit/35c799d79177b962ddace2fa068101465570a29a
- github.com/python/cpython/commit/5130731c9e779b97d00a24f54cdce73ce9975dfd
- github.com/python/cpython/commit/66f8bb76a15e64a1bb7688b177ed29e26230fdee
- github.com/python/cpython/commit/6d0850c4c8188035643586ab4d8ec2468abd699e
- github.com/python/cpython/commit/81939dad77001556c527485d31a2d0f4a759033e
- github.com/python/cpython/commit/91e3669e01245185569d09e9e6e11641282971ee
- github.com/python/cpython/commit/94591dca510c796c7d40e9b4167ea56f2fdf28ca
- github.com/python/cpython/commit/c8f868dc52f98011d0f9b459b6487920bfb0ac4d
- github.com/python/cpython/commit/d86b49411753bf2c83291e3a14ae43fefded2f84
- github.com/python/cpython/commit/e1dfa978b1ad210d551385ad8073ec6154f53763
- github.com/python/cpython/commit/eb29e2f5905da93333d1ce78bc98b151e763ff46
- github.com/python/cpython/issues/118486
- mail.python.org/archives/list/security-announce@python.org/thread/PRGS5OR3N3PNPT4BMV2VAGN5GMUI5636/
- security.netapp.com/advisory/ntap-20240705-0005/
Vendor advisories and official records. Exploit/PoC links are deliberately left out.