VDB

CVE-2024-4030

CVE-2024-4030 PUBLISHED CVSS 7.1 HIGH

tempfile.mkdtemp() may be readable and writeable by all users on Windows

Reported by psf · Published May 7, 2024

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
alpine/python-3.10alpine3.13.0-beta2, 3.12.4, 3.11.10, 3.10.15, 3.9.20, 3.8.20
debian/python-3.12debian3.13.0-beta2, 3.12.4, 3.11.10, 3.10.15, 3.9.20, 3.8.20
debian/python-3.11debian3.13.0-beta2, 3.12.4, 3.11.10, 3.10.15, 3.9.20, 3.8.20

Risk scores

CVSS 3.1
7.1
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N

Affected products

VendorProductVersions
Python Software FoundationCPython0, 3.9.0, 3.10.0
chainguardpython-3.8*
pythoncpython3.13.0a1, 0
Python Software FoundationCPython3.12.0, 3.13.0a1, 0
Python Software FoundationCPython
chainguardpython-3.9*
wolfiaws-cli-v2*
wolfipython-3.11*
chainguardpython-3.11*
wolfipython-3.10*
chainguardpython-3.10*
chainguardaws-cli-v2*
chainguardpython-3.12*
wolfipython-3.12*

Timeline

  • May 7, 2024 CVE Published
  • May 8, 2024 EPSS Score (30 in total, the first dated here)
  • Oct 4, 2024 Coalition ESS Score (13 in total, the first dated here)
  • Jun 2, 2026 Security Advisory (4 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-4030
vulnetix vdb fixes CVE-2024-4030

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-4030/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

  • vendor-advisory
  • issue-tracking
  • patch
  • patch
  • patch
  • patch
  • patch
  • patch
  • patch
  • patch
  • patch
  • patch
  • patch
  • patch
Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›