7.1
HIGH
CVE-2024-4030
Microsoft Windows Temporary Directory Permissions Weakness
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.

INFO

Published Date :

May 7, 2024, 9:15 p.m.

Last Modified :

Nov. 21, 2024, 9:42 a.m.

Remotely Exploitable :

No

Impact Score :

5.2

Exploitability Score :

1.8
Affected Products

The following products are affected by CVE-2024-4030 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Python python
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2024-4030.

URL Resource
https://github.com/python/cpython/commit/35c799d79177b962ddace2fa068101465570a29a
https://github.com/python/cpython/commit/5130731c9e779b97d00a24f54cdce73ce9975dfd
https://github.com/python/cpython/commit/66f8bb76a15e64a1bb7688b177ed29e26230fdee
https://github.com/python/cpython/commit/6d0850c4c8188035643586ab4d8ec2468abd699e
https://github.com/python/cpython/commit/81939dad77001556c527485d31a2d0f4a759033e
https://github.com/python/cpython/commit/8ed546679524140d8282175411fd141fe7df070d
https://github.com/python/cpython/commit/91e3669e01245185569d09e9e6e11641282971ee
https://github.com/python/cpython/commit/94591dca510c796c7d40e9b4167ea56f2fdf28ca
https://github.com/python/cpython/commit/c8f868dc52f98011d0f9b459b6487920bfb0ac4d
https://github.com/python/cpython/commit/d86b49411753bf2c83291e3a14ae43fefded2f84
https://github.com/python/cpython/commit/e1dfa978b1ad210d551385ad8073ec6154f53763
https://github.com/python/cpython/commit/eb29e2f5905da93333d1ce78bc98b151e763ff46
https://github.com/python/cpython/issues/118486
https://mail.python.org/archives/list/[email protected]/thread/PRGS5OR3N3PNPT4BMV2VAGN5GMUI5636/
https://security.netapp.com/advisory/ntap-20240705-0005/
https://github.com/python/cpython/commit/35c799d79177b962ddace2fa068101465570a29a
https://github.com/python/cpython/commit/5130731c9e779b97d00a24f54cdce73ce9975dfd
https://github.com/python/cpython/commit/66f8bb76a15e64a1bb7688b177ed29e26230fdee
https://github.com/python/cpython/commit/6d0850c4c8188035643586ab4d8ec2468abd699e
https://github.com/python/cpython/commit/81939dad77001556c527485d31a2d0f4a759033e
https://github.com/python/cpython/commit/8ed546679524140d8282175411fd141fe7df070d
https://github.com/python/cpython/commit/91e3669e01245185569d09e9e6e11641282971ee
https://github.com/python/cpython/commit/94591dca510c796c7d40e9b4167ea56f2fdf28ca
https://github.com/python/cpython/commit/c8f868dc52f98011d0f9b459b6487920bfb0ac4d
https://github.com/python/cpython/commit/d86b49411753bf2c83291e3a14ae43fefded2f84
https://github.com/python/cpython/commit/e1dfa978b1ad210d551385ad8073ec6154f53763
https://github.com/python/cpython/commit/eb29e2f5905da93333d1ce78bc98b151e763ff46
https://github.com/python/cpython/issues/118486
https://mail.python.org/archives/list/[email protected]/thread/PRGS5OR3N3PNPT4BMV2VAGN5GMUI5636/
https://security.netapp.com/advisory/ntap-20240705-0005/

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2024-4030 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2024-4030 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/python/cpython/commit/35c799d79177b962ddace2fa068101465570a29a
    Added Reference https://github.com/python/cpython/commit/5130731c9e779b97d00a24f54cdce73ce9975dfd
    Added Reference https://github.com/python/cpython/commit/66f8bb76a15e64a1bb7688b177ed29e26230fdee
    Added Reference https://github.com/python/cpython/commit/6d0850c4c8188035643586ab4d8ec2468abd699e
    Added Reference https://github.com/python/cpython/commit/81939dad77001556c527485d31a2d0f4a759033e
    Added Reference https://github.com/python/cpython/commit/8ed546679524140d8282175411fd141fe7df070d
    Added Reference https://github.com/python/cpython/commit/91e3669e01245185569d09e9e6e11641282971ee
    Added Reference https://github.com/python/cpython/commit/94591dca510c796c7d40e9b4167ea56f2fdf28ca
    Added Reference https://github.com/python/cpython/commit/c8f868dc52f98011d0f9b459b6487920bfb0ac4d
    Added Reference https://github.com/python/cpython/commit/d86b49411753bf2c83291e3a14ae43fefded2f84
    Added Reference https://github.com/python/cpython/commit/e1dfa978b1ad210d551385ad8073ec6154f53763
    Added Reference https://github.com/python/cpython/commit/eb29e2f5905da93333d1ce78bc98b151e763ff46
    Added Reference https://github.com/python/cpython/issues/118486
    Added Reference https://mail.python.org/archives/list/[email protected]/thread/PRGS5OR3N3PNPT4BMV2VAGN5GMUI5636/
    Added Reference https://security.netapp.com/advisory/ntap-20240705-0005/
  • CVE Modified by [email protected]

    Sep. 07, 2024

    Action Type Old Value New Value
    Changed 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. 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.
  • CVE Modified by [email protected]

    Jul. 05, 2024

    Action Type Old Value New Value
    Added Reference Python Software Foundation https://security.netapp.com/advisory/ntap-20240705-0005/ [No types assigned]
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Jul. 03, 2024

    Action Type Old Value New Value
    Added CVSS V3.1 CISA-ADP AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N
  • CVE Modified by [email protected]

    Jun. 13, 2024

    Action Type Old Value New Value
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/35c799d79177b962ddace2fa068101465570a29a [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/5130731c9e779b97d00a24f54cdce73ce9975dfd [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/66f8bb76a15e64a1bb7688b177ed29e26230fdee [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/6d0850c4c8188035643586ab4d8ec2468abd699e [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/91e3669e01245185569d09e9e6e11641282971ee [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/94591dca510c796c7d40e9b4167ea56f2fdf28ca [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/c8f868dc52f98011d0f9b459b6487920bfb0ac4d [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/d86b49411753bf2c83291e3a14ae43fefded2f84 [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/e1dfa978b1ad210d551385ad8073ec6154f53763 [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/eb29e2f5905da93333d1ce78bc98b151e763ff46 [No types assigned]
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    May. 07, 2024

    Action Type Old Value New Value
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/81939dad77001556c527485d31a2d0f4a759033e [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/commit/8ed546679524140d8282175411fd141fe7df070d [No types assigned]
  • CVE Received by [email protected]

    May. 07, 2024

    Action Type Old Value New Value
    Added 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.
    Added Reference Python Software Foundation https://mail.python.org/archives/list/[email protected]/thread/PRGS5OR3N3PNPT4BMV2VAGN5GMUI5636/ [No types assigned]
    Added Reference Python Software Foundation https://github.com/python/cpython/issues/118486 [No types assigned]
    Added CWE Python Software Foundation CWE-276
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2024-4030 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2024-4030 weaknesses.

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability