Lucene search

K
vulnrichmentPSFVULNRICHMENT:CVE-2024-4030
HistoryMay 07, 2024 - 9:02 p.m.

CVE-2024-4030 tempfile.mkdtemp() may be readable and writeable by all users on Windows

2024-05-0721:02:55
CWE-276
PSF
github.com
3
tempfile.mkdtemp
permissions
vulnerability
windows
python
unix
mkdir function
cve-2024-4030

AI Score

6.8

Confidence

High

EPSS

0.001

Percentile

17.1%

SSVC

Exploitation

none

Automatable

no

Technical Impact

total

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.

ADP Affected

[
  {
    "cpes": [
      "cpe:2.3:a:python:cpython:*:*:*:*:*:*:*:*"
    ],
    "vendor": "python",
    "product": "cpython",
    "versions": [
      {
        "status": "affected",
        "version": "0"
      },
      {
        "status": "affected",
        "version": "3.13.0a1"
      }
    ],
    "defaultStatus": "unknown"
  }
]

References

AI Score

6.8

Confidence

High

EPSS

0.001

Percentile

17.1%

SSVC

Exploitation

none

Automatable

no

Technical Impact

total

Related for VULNRICHMENT:CVE-2024-4030