{"schemaVersion":3,"id":"CVE-2024-4030","aliases":["CGA-2vj6-9jh9-57q6","CGA-5hw4-rhmp-4rwq","CGA-6376-fw76-9xff","CGA-8wpg-jvm4-fw8g","CGA-fwcr-xhmx-w4jc","CGA-ghr8-f3p7-h5qg","CGA-mv3v-v6j8-m9qq","CGA-x94g-56rx-f36v","openSUSE-SU-2024:14331-1","CGA-46j2-93m5-qvcg","CGA-8639-mxc5-jh6m"],"status":"published","duplicateOf":null,"title":null,"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.\n\nIf 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.\n\nThis 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.","dates":{"published":"2024-05-07T21:02:55.284Z","modified":"2024-09-07T02:44:36.613Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":7.1,"severity":"high","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":7.1,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Wolfi","score":7.1,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","exploitability":4.6,"impact":8.7,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Chainguard","score":7.1,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","exploitability":4.6,"impact":8.7,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":7.1,"severity":"high","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.003,"percentile":0.21364,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":-0.003000000000000008,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.00303},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.003,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.003,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.003,"percentile":0.21364}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00303,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.003,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.003,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.003,"percentile":0.21364}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-276","name":"Incorrect Default Permissions","description":"During installation, installed file permissions are set to allow anyone to modify those files.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"Medium","url":"https://cwe.mitre.org/data/definitions/276.html"}],"affected":[{"vendor":"chainguard","product":"aws-cli-v2","name":"aws-cli-v2","label":"aws-cli-v2","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/aws-cli-v2","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"chainguard","product":"python-3.10","name":"python-3.10","label":"python-3.10","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/python-3.10","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"chainguard","product":"python-3.11","name":"python-3.11","label":"python-3.11","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/python-3.11","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"chainguard","product":"python-3.12","name":"python-3.12","label":"python-3.12","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/python-3.12","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"chainguard","product":"python-3.9","name":"python-3.9","label":"python-3.9","ecosystem":"Chainguard","cpePart":null,"purl":"pkg:apk/chainguard/python-3.9","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"wolfi","product":"aws-cli-v2","name":"aws-cli-v2","label":"aws-cli-v2","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/aws-cli-v2","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"wolfi","product":"python-3.10","name":"python-3.10","label":"python-3.10","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/python-3.10","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"wolfi","product":"python-3.11","name":"python-3.11","label":"python-3.11","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/python-3.11","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"wolfi","product":"python-3.12","name":"python-3.12","label":"python-3.12","ecosystem":"Wolfi","cpePart":null,"purl":"pkg:apk/wolfi/python-3.12","purlType":"apk","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"python software foundation","product":"cpython","name":"CPython","label":"cpython","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 3.8.20","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.9.0, < 3.9.20","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.10.0, < 3.10.15","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.11.0, < 3.11.10","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.12.0, < 3.12.4","noFixRecorded":false,"fixedIn":null},{"text":"≥ 3.13.0a1, < 3.13.0b1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 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","eol":null,"hubHref":"/vendor/python_software_foundation/cpython"},{"vendor":"opensuse","product":"python39&distro=openSUSE Tumbleweed","name":"python39","label":"python39&distro=openSUSE Tumbleweed","ecosystem":"openSUSE","cpePart":null,"purl":"pkg:rpm/opensuse/python39&distro=openSUSE Tumbleweed","purlType":"rpm","versions":[{"text":"< 3.9.20-1.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.9.20-1.1","eol":null,"hubHref":null}],"affectedCount":11,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/PRGS5OR3N3PNPT4BMV2VAGN5GMUI5636/","label":"mail.python.org/archives/list/security-announce@python.org/thread/PRGS5OR3N3PNPT4BMV2VAGN5GMUI5636/","hostname":"mail.python.org","tags":["Vendor Advisory","Advisory"]},{"url":"https://github.com/python/cpython/issues/118486","label":"github.com/python/cpython/issues/118486","hostname":"github.com","tags":["Issue Tracking","REPORT"]},{"url":"https://github.com/python/cpython/commit/81939dad77001556c527485d31a2d0f4a759033e","label":"github.com/python/cpython/commit/81939dad77001556c527485d31a2d0f4a759033e","hostname":"github.com","tags":["Patch","FIX"]},{"url":"https://github.com/python/cpython/commit/8ed546679524140d8282175411fd141fe7df070d","label":"github.com/python/cpython/commit/8ed546679524140d8282175411fd141fe7df070d","hostname":"github.com","tags":["Patch","FIX"]},{"url":"https://github.com/python/cpython/commit/35c799d79177b962ddace2fa068101465570a29a","label":"github.com/python/cpython/commit/35c799d79177b962ddace2fa068101465570a29a","hostname":"github.com","tags":["Patch","FIX"]},{"url":"https://github.com/python/cpython/commit/5130731c9e779b97d00a24f54cdce73ce9975dfd","label":"github.com/python/cpython/commit/5130731c9e779b97d00a24f54cdce73ce9975dfd","hostname":"github.com","tags":["Patch","FIX"]},{"url":"https://github.com/python/cpython/commit/66f8bb76a15e64a1bb7688b177ed29e26230fdee","label":"github.com/python/cpython/commit/66f8bb76a15e64a1bb7688b177ed29e26230fdee","hostname":"github.com","tags":["Patch","FIX"]},{"url":"https://github.com/python/cpython/commit/6d0850c4c8188035643586ab4d8ec2468abd699e","label":"github.com/python/cpython/commit/6d0850c4c8188035643586ab4d8ec2468abd699e","hostname":"github.com","tags":["Patch","FIX"]},{"url":"https://github.com/python/cpython/commit/91e3669e01245185569d09e9e6e11641282971ee","label":"github.com/python/cpython/commit/91e3669e01245185569d09e9e6e11641282971ee","hostname":"github.com","tags":["Patch","FIX"]},{"url":"https://github.com/python/cpython/commit/94591dca510c796c7d40e9b4167ea56f2fdf28ca","label":"github.com/python/cpython/commit/94591dca510c796c7d40e9b4167ea56f2fdf28ca","hostname":"github.com","tags":["Patch","FIX"]},{"url":"https://github.com/python/cpython/commit/c8f868dc52f98011d0f9b459b6487920bfb0ac4d","label":"github.com/python/cpython/commit/c8f868dc52f98011d0f9b459b6487920bfb0ac4d","hostname":"github.com","tags":["Patch","FIX"]},{"url":"https://github.com/python/cpython/commit/d86b49411753bf2c83291e3a14ae43fefded2f84","label":"github.com/python/cpython/commit/d86b49411753bf2c83291e3a14ae43fefded2f84","hostname":"github.com","tags":["Patch","FIX"]},{"url":"https://github.com/python/cpython/commit/e1dfa978b1ad210d551385ad8073ec6154f53763","label":"github.com/python/cpython/commit/e1dfa978b1ad210d551385ad8073ec6154f53763","hostname":"github.com","tags":["Patch","FIX"]},{"url":"https://github.com/python/cpython/commit/eb29e2f5905da93333d1ce78bc98b151e763ff46","label":"github.com/python/cpython/commit/eb29e2f5905da93333d1ce78bc98b151e763ff46","hostname":"github.com","tags":["Patch","FIX"]},{"url":"https://security.netapp.com/advisory/ntap-20240705-0005/","label":"security.netapp.com/advisory/ntap-20240705-0005/","hostname":"security.netapp.com","tags":["Advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/4xxx/CVE-2024-4030.json","label":"github.com/CVEProject/cvelistV5/tree/main/cves/2024/4xxx/CVE-2024-4030.json","hostname":"github.com","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-4030","label":"nvd.nist.gov/vuln/detail/CVE-2024-4030","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/python/cpython","label":"github.com/python/cpython","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://www.suse.com/security/cve/CVE-2024-4030","label":"www.suse.com/security/cve/CVE-2024-4030","hostname":"www.suse.com","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":["OPENSUSE-SU-2024:14109-1","OPENSUSE-SU-2024:14295-1","OPENSUSE-SU-2024:14340-1","OPENSUSE-SU-2024:14345-1","OPENSUSE-SU-2024:14346-1","OPENSUSE-SU-2024:14434-1","OPENSUSE-SU-2025:15713-1","SUSE-SU-2024:2572-1","SUSE-SU-2025:20154-1","SUSE-SU-2025:20374-1"],"duplicates":[],"related":["CGA-4RF5-X4GX-JVF8","CGA-6QP7-9R8G-VG6M","CGA-CGC7-M9MJ-C94W","CGA-CHQQ-VHV9-XRV4","CGA-JW6C-PW87-J82G","CGA-Q3QC-6CJ9-JG33","CGA-RFW8-45WC-66GM","OPENSUSE-SU-2024:14109-1","OPENSUSE-SU-2024:14295-1","OPENSUSE-SU-2024:14340-1","OPENSUSE-SU-2024:14345-1","OPENSUSE-SU-2024:14346-1","OPENSUSE-SU-2024:14434-1","OPENSUSE-SU-2025:15713-1","SUSE-SU-2024:2572-1","SUSE-SU-2025:20154-1","SUSE-SU-2025:20374-1"]},"timeline":[{"kind":"published","date":"2024-05-07T21:02:55.284Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-09-07T02:44:36.613Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":28,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T06:20:37.847Z","stale":false,"partial":false}}