7.1

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

Deferred
AliasesCGA-2vj6-9jh9-57q6CGA-5hw4-rhmp-4rwqCGA-6376-fw76-9xff
Published 07-05-2024Last modified 07-09-2024

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 24.4% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 7.1, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.1/10
010
High · v3.1 (CVE.org)
EPSS score
0.30%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 10 · Related 17

Timeline

  1. 07-05-2024
    PublishedVulnerability first disclosed.
  2. 07-09-2024
    Last 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

EPSS trend

Probability

0.30%

Chance of exploitation in the next 30 days

Percentile

24%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.30% on 05-11-2026

05-11-202605-12-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.

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 links
Show all 19 references