CVE-2024-4030: python software foundation cpython Incorrect Default Permissions
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 21.2% of scored vulnerabilities.
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
21%
Versus all other CVEs
30-day change
0.00 pp
From 0.30% on 18-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
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 linksShow all 19 references
- github.com/python/cpythonPACKAGE