cve.bz

CVE-2024-4030 python software foundation cpython: Incorrect Default Permissions

7.1 highEPSS 0.3%

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

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

Severity

CVSS 3.1

7.1 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
EPSS
0.3% (unchanged from 0.3% a week ago; 0.3% 30 days ago) estimated probability of exploitation activity in the next 30 days; 23rd percentile. Scored 2026-11-23. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2024-05-08. 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-276 Incorrect Default Permissions
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-4030 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-4030?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-4030?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-2024-4030 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

Versions

From the CNA's record in the CVE List.

ProductAffected
Python Software Foundation CPythonbefore 3.8.20
Python Software Foundation CPythonfrom 3.9.0 before 3.9.20
Python Software Foundation CPythonfrom 3.10.0 before 3.10.15
Python Software Foundation CPythonfrom 3.11.0 before 3.11.10
Python Software Foundation CPythonfrom 3.12.0 before 3.12.4
Python Software Foundation CPythonfrom 3.13.0a1 before 3.13.0b1

Linux distributions

DistributionReleasePackageFixed inAdvisory
SUSELinux Enterprise Module for Python 3 15 SP6python312, python312-core3.12.4-150600.3.3.1SUSE-SU-2024:2572-1
SUSELinux Micro 6.0python311, python311-core3.11.11-1.1SUSE-SU-2025:20154-1
SUSELinux Micro 6.1python311, python311-core3.11.12-slfo.1.1_1.1SUSE-SU-2025:20374-1
openSUSELeap 15.6python312, python312-core, python312-documentation3.12.4-150600.3.3.1SUSE-SU-2024:2572-1
openSUSETumbleweedpython3103.10.15-1.1openSUSE-SU-2024:14345-1
openSUSETumbleweedpython3113.11.9-7.1openSUSE-SU-2024:14346-1
openSUSETumbleweedpython3123.12.5-1.1openSUSE-SU-2024:14295-1
openSUSETumbleweedpython3133.13.0~b3-1.1openSUSE-SU-2024:14109-1
openSUSETumbleweedpython3143.14.0~a1-1.1openSUSE-SU-2024:14434-1
openSUSETumbleweedpython3153.15.0~a1-1.1openSUSE-SU-2025:15713-1
openSUSETumbleweedpython383.8.20-1.1openSUSE-SU-2024:14340-1
openSUSETumbleweedpython393.9.20-1.1openSUSE-SU-2024:14331-1

From the distributions' data via OSV.dev: SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: SUSE · openSUSE.

Attack patterns (CAPEC)

  • CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs Likelihood: High · Severity: High
  • CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High
  • CAPEC-127 Directory Indexing Likelihood: High · Severity: Medium

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

References

Check your stackJSON