CVE-2024-4030: tempfile.mkdtemp() may be readable and writeable by all users on Windows
Vulnerability summary
CVE-2024-4030 is a high (CVSS 7.1) Incorrect Default Permissions vulnerability in python software foundation cpython. EPSS estimates a 0.30% chance of exploitation in the next 30 days, higher than 24.4% of scored vulnerabilities.
Not severe (CVSS 7.1, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 10 · Related 17Timeline
- 07-05-2024PublishedVulnerability first disclosed.
- 07-09-2024Last modifiedVulnerability information updated.
Description
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.
CVSS metrics
4 scores · 4 sources · 1 version- OSV · WolfiEcosystem advisory · calculated7.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
- OSV · ChainguardEcosystem advisory · calculated7.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
- NVDNIST7.1HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
EPSS trend
Probability
0.30%
Chance of exploitation in the next 30 days
Percentile
24%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.30% on 05-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard5 products
- aws-cli-v2All versions (No fix recorded)
- python-3.10All versions (No fix recorded)
- python-3.11All versions (No fix recorded)
- python-3.12All versions (No fix recorded)
- python-3.9All versions (No fix recorded)
Wolfi4 products
- aws-cli-v2All versions (No fix recorded)
- python-3.10All versions (No fix recorded)
- python-3.11All versions (No fix recorded)
- python-3.12All versions (No fix recorded)
Opensuse1 product
- python39&distro=openSUSE Tumbleweed< 3.9.20-1.1
Python software foundation1 product
- cpython< 3.8.20 | ≥ 3.9.0, < 3.9.20 | ≥ 3.10.0, < 3.10.15 | ≥ 3.11.0, < 3.11.10 | ≥ 3.12.0, < 3.12.4 | ≥ 3.13.0a1, < 3.13.0b1
4 vendors · 11 products
References
19 links- mail.python.org/archives/list/[email protected]/thread/PRGS5OR3N3PNPT4BMV2VAGN5GMUI5636/Vendor AdvisoryAdvisory
Show all 19 references
- github.com/python/cpythonPACKAGE