{"dataType":"CVE_RECORD","cveMetadata":{"cveId":"CVE-2024-4030","assignerOrgId":"28c92f92-d60d-412d-b760-e73465c3df22","state":"PUBLISHED","assignerShortName":"PSF","dateReserved":"2024-04-22T14:49:13.316Z","datePublished":"2024-05-07T21:02:55.284Z","dateUpdated":"2024-09-07T02:44:36.613Z"},"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","platforms":["Windows"],"product":"CPython","repo":"https://github.com/python/cpython","vendor":"Python Software Foundation","versions":[{"version":"0","lessThan":"3.8.20","status":"affected","versionType":"python"},{"version":"3.9.0","lessThan":"3.9.20","status":"affected","versionType":"python"},{"version":"3.10.0","lessThan":"3.10.15","status":"affected","versionType":"python"},{"version":"3.11.0","lessThan":"3.11.10","status":"affected","versionType":"python"},{"version":"3.12.0","lessThan":"3.12.4","status":"affected","versionType":"python"},{"version":"3.13.0a1","lessThan":"3.13.0b1","status":"affected","versionType":"python"}]}],"credits":[{"lang":"en","type":"finder","value":"Aobo Wang"}],"descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p><span style=\"background-color: transparent;\">On Windows a directory returned by </span><span style=\"background-color: transparent;\">tempfile.mkdtemp()</span><span style=\"background-color: transparent;\"> 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.</span></p><p><span style=\"background-color: transparent;\">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.</span></p><span style=\"background-color: transparent;\">This issue was caused by Python not supporting Unix permissions on Windows. The fix adds support for Unix “700” for the </span><span style=\"background-color: transparent;\">mkdir</span><span style=\"background-color: transparent;\"> function on Windows which is used by </span><span style=\"background-color: transparent;\">mkdtemp()</span><span style=\"background-color: transparent;\"> to ensure the newly created directory has the proper permissions.</span><br>"}],"value":"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."}],"impacts":[{"capecId":"CAPEC-1","descriptions":[{"lang":"en","value":"CAPEC-1 Accessing Functionality Not Properly Constrained by ACLs"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-276","description":"CWE-276 Incorrect Default Permissions","lang":"en","type":"CWE"}]}],"providerMetadata":{"orgId":"28c92f92-d60d-412d-b760-e73465c3df22","shortName":"PSF","dateUpdated":"2024-09-07T02:44:36.613Z"},"references":[{"tags":["vendor-advisory"],"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/PRGS5OR3N3PNPT4BMV2VAGN5GMUI5636/"},{"tags":["issue-tracking"],"url":"https://github.com/python/cpython/issues/118486"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/81939dad77001556c527485d31a2d0f4a759033e"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/8ed546679524140d8282175411fd141fe7df070d"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/35c799d79177b962ddace2fa068101465570a29a"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/5130731c9e779b97d00a24f54cdce73ce9975dfd"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/66f8bb76a15e64a1bb7688b177ed29e26230fdee"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/6d0850c4c8188035643586ab4d8ec2468abd699e"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/91e3669e01245185569d09e9e6e11641282971ee"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/94591dca510c796c7d40e9b4167ea56f2fdf28ca"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/c8f868dc52f98011d0f9b459b6487920bfb0ac4d"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/d86b49411753bf2c83291e3a14ae43fefded2f84"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/e1dfa978b1ad210d551385ad8073ec6154f53763"},{"tags":["patch"],"url":"https://github.com/python/cpython/commit/eb29e2f5905da93333d1ce78bc98b151e763ff46"},{"url":"https://security.netapp.com/advisory/ntap-20240705-0005/"}],"source":{"discovery":"UNKNOWN"},"title":"tempfile.mkdtemp() may be readable and writeable by all users on Windows","x_generator":{"engine":"Vulnogram 0.1.0-dev"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":7.1,"attackVector":"LOCAL","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"NONE","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"id":"CVE-2024-4030","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"version":"2.0.3","timestamp":"2024-05-08T15:32:37.215710Z"}}}],"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"}],"providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2024-06-04T17:55:02.857Z"}},{"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2024-08-01T20:26:57.265Z"},"title":"CVE Program Container","references":[{"tags":["vendor-advisory","x_transferred"],"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/PRGS5OR3N3PNPT4BMV2VAGN5GMUI5636/"},{"tags":["issue-tracking","x_transferred"],"url":"https://github.com/python/cpython/issues/118486"},{"tags":["patch","x_transferred"],"url":"https://github.com/python/cpython/commit/81939dad77001556c527485d31a2d0f4a759033e"},{"tags":["patch","x_transferred"],"url":"https://github.com/python/cpython/commit/8ed546679524140d8282175411fd141fe7df070d"},{"tags":["patch","x_transferred"],"url":"https://github.com/python/cpython/commit/35c799d79177b962ddace2fa068101465570a29a"},{"tags":["patch","x_transferred"],"url":"https://github.com/python/cpython/commit/5130731c9e779b97d00a24f54cdce73ce9975dfd"},{"tags":["patch","x_transferred"],"url":"https://github.com/python/cpython/commit/66f8bb76a15e64a1bb7688b177ed29e26230fdee"},{"tags":["patch","x_transferred"],"url":"https://github.com/python/cpython/commit/6d0850c4c8188035643586ab4d8ec2468abd699e"},{"tags":["patch","x_transferred"],"url":"https://github.com/python/cpython/commit/91e3669e01245185569d09e9e6e11641282971ee"},{"tags":["patch","x_transferred"],"url":"https://github.com/python/cpython/commit/94591dca510c796c7d40e9b4167ea56f2fdf28ca"},{"tags":["patch","x_transferred"],"url":"https://github.com/python/cpython/commit/c8f868dc52f98011d0f9b459b6487920bfb0ac4d"},{"tags":["patch","x_transferred"],"url":"https://github.com/python/cpython/commit/d86b49411753bf2c83291e3a14ae43fefded2f84"},{"tags":["patch","x_transferred"],"url":"https://github.com/python/cpython/commit/e1dfa978b1ad210d551385ad8073ec6154f53763"},{"tags":["patch","x_transferred"],"url":"https://github.com/python/cpython/commit/eb29e2f5905da93333d1ce78bc98b151e763ff46"},{"url":"https://security.netapp.com/advisory/ntap-20240705-0005/","tags":["x_transferred"]}]}]},"dataVersion":"5.1"}