CVE-2024-4030
Python Interpreter vulnerability analysis and mitigation

Overview

CVE-2024-4030 affects Python's tempfile.mkdtemp() function on Windows systems. The vulnerability was discovered when it was found that directories created by this function would not always have permissions set to restrict reading and writing to other users, instead inheriting permissions from the default location. This particularly affects alternate configurations or users without a profile directory. The vulnerability does not affect non-Windows platforms or systems where the temporary directory location hasn't been changed (Python Security).

Technical details

The vulnerability stems from Python not supporting Unix permissions on Windows. The fix implements support for Unix mode "0o700" for the mkdir function on Windows, which is used by mkdtemp() to ensure newly created directories have proper permissions. The vulnerability has been assigned a CVSS 3.1 Base Score of 7.1 (HIGH) with vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N (CISA ADP).

Impact

Successful exploitation of this vulnerability could lead to disclosure of information or addition/modification of data, as temporary directories may be accessible by unauthorized users. The impact is particularly significant in scenarios where the base temporary directory is more permissive than the default (NetApp Advisory).

Mitigation and workarounds

The fix has been implemented in Python versions 3.13.0b1 and 3.12.4, with backports pending for other security release streams. The solution adds support for Unix "0o700" mode in the mkdir function on Windows, ensuring proper directory permissions. Users are advised to upgrade to these patched versions (Python Security).

Additional resources


SourceThis report was generated using AI

Related Python Interpreter vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-4517CRITICAL9.4
  • Rocky LinuxRocky Linux
  • python39-tools
NoYesJun 03, 2025
CVE-2025-49714HIGH7.8
  • Visual Studio CodeVisual Studio Code
  • cpe:2.3:a:microsoft:visual_studio_code
NoYesJul 08, 2025
CVE-2025-8194HIGH7.5
  • Rocky LinuxRocky Linux
  • python39-devel:3.9::python39
NoYesJul 28, 2025
CVE-2025-8291MEDIUM4.3
  • Python InterpreterPython Interpreter
  • python39-devel:3.9::python3x-pip
NoYesOct 07, 2025
CVE-2025-6069MEDIUM4.3
  • Python InterpreterPython Interpreter
  • python39-pycparser
NoYesJun 17, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management