{"id":"CVE-2023-6597","state":"PUBLISHED","title":"An issue was found in the CPython `tempfile.TemporaryDirectory` class affecting versions 3.12.1, 3.11.7, 3.10.13, 3.9.18, and 3.8.18 and prior.","description":"An issue was found in the CPython `tempfile.TemporaryDirectory` class affecting versions 3.12.1, 3.11.7, 3.10.13, 3.9.18, and 3.8.18 and prior.\n\nThe tempfile.TemporaryDirectory class would dereference symlinks during cleanup of permissions-related errors. This means users which can run privileged programs are potentially able to modify permissions of files referenced by symlinks in some circumstances.\n","publishedAt":"2024-03-19T15:44:28.989Z","updatedAt":"2025-11-03T21:50:47.799Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N","source":"PSF"},"assigner":"PSF","products":["Python Software Foundation CPython"],"affected":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.8.19","versionType":"python"},{"version":"3.9.0","status":"affected","lessThan":"3.9.19","versionType":"python"},{"version":"3.10.0","status":"affected","lessThan":"3.10.14","versionType":"python"},{"version":"3.11.0","status":"affected","lessThan":"3.11.8","versionType":"python"},{"version":"3.12.0","status":"affected","lessThan":"3.12.1","versionType":"python"},{"version":"3.13.0a1","status":"affected","lessThan":"3.13.0a3","versionType":"python"}],"repo":"https://github.com/python/cpython"}],"references":["https://github.com/python/cpython/commit/81c16cd94ec38d61aa478b9a452436dc3b1b524d","https://github.com/python/cpython/commit/6ceb8aeda504b079fef7a57b8d81472f15cdd9a5","https://github.com/python/cpython/commit/5585334d772b253a01a6730e8202ffb1607c3d25","https://github.com/python/cpython/commit/8eaeefe49d179ca4908d052745e3bb8b6f238f82","https://github.com/python/cpython/commit/d54e22a669ae6e987199bb5d2c69bb5a46b0083b","https://github.com/python/cpython/commit/02a9259c717738dfe6b463c44d7e17f2b6d2cb3a","https://github.com/python/cpython/issues/91133","https://mail.python.org/archives/list/security-announce@python.org/thread/Q5C6ATFC67K53XFV4KE45325S7NS62LD/","https://lists.debian.org/debian-lts-announce/2024/03/msg00025.html","http://www.openwall.com/lists/oss-security/2024/03/20/5","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/T3IGRX54M7RNCQOXVQO5KQKTGWCOABIM/","https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/U5VHWS52HGD743C47UMCSAK2A773M2YE/","https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html","https://lists.debian.org/debian-lts-announce/2024/11/msg00005.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:42.242Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/6xxx/CVE-2023-6597.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-6597","state":"PUBLISHED","datePublished":"2024-03-19T15:44:28.989Z","dateUpdated":"2025-11-03T21:50:47.799Z","assignerShortName":"PSF","assignerOrgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateReserved":"2023-12-07T20:59:23.246Z"},"containers":{"cna":{"descriptions":[{"lang":"en","value":"An issue was found in the CPython `tempfile.TemporaryDirectory` class affecting versions 3.12.1, 3.11.7, 3.10.13, 3.9.18, and 3.8.18 and prior.\n\nThe tempfile.TemporaryDirectory class would dereference symlinks during cleanup of permissions-related errors. This means users which can run privileged programs are potentially able to modify permissions of files referenced by symlinks in some circumstances.\n"}],"affected":[{"vendor":"Python Software Foundation","product":"CPython","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.8.19","versionType":"python"},{"version":"3.9.0","status":"affected","lessThan":"3.9.19","versionType":"python"},{"version":"3.10.0","status":"affected","lessThan":"3.10.14","versionType":"python"},{"version":"3.11.0","status":"affected","lessThan":"3.11.8","versionType":"python"},{"version":"3.12.0","status":"affected","lessThan":"3.12.1","versionType":"python"},{"version":"3.13.0a1","status":"affected","lessThan":"3.13.0a3","versionType":"python"}],"repo":"https://github.com/python/cpython"}],"references":[{"url":"https://github.com/python/cpython/commit/81c16cd94ec38d61aa478b9a452436dc3b1b524d","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/6ceb8aeda504b079fef7a57b8d81472f15cdd9a5","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/5585334d772b253a01a6730e8202ffb1607c3d25","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/8eaeefe49d179ca4908d052745e3bb8b6f238f82","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/d54e22a669ae6e987199bb5d2c69bb5a46b0083b","tags":["patch"]},{"url":"https://github.com/python/cpython/commit/02a9259c717738dfe6b463c44d7e17f2b6d2cb3a","tags":["patch"]},{"url":"https://github.com/python/cpython/issues/91133","tags":["issue-tracking"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/Q5C6ATFC67K53XFV4KE45325S7NS62LD/","tags":["vendor-advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/03/msg00025.html"},{"url":"http://www.openwall.com/lists/oss-security/2024/03/20/5"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/T3IGRX54M7RNCQOXVQO5KQKTGWCOABIM/"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/U5VHWS52HGD743C47UMCSAK2A773M2YE/"}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"LOCAL","availabilityImpact":"NONE","baseScore":7.8,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"providerMetadata":{"shortName":"PSF","orgId":"28c92f92-d60d-412d-b760-e73465c3df22","dateUpdated":"2024-06-13T19:24:11.289Z"},"source":{"discovery":"UNKNOWN"},"x_generator":{"engine":"Vulnogram 0.1.0-dev"}},"adp":[{"title":"CISA ADP Vulnrichment","affected":[{"vendor":"python_software_foundation","product":"cpython","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"3.8.19","versionType":"custom"},{"version":"3.9.0","status":"affected","lessThan":"3.9.19","versionType":"custom"},{"version":"3.10.0","status":"affected","lessThan":"3.10.14","versionType":"custom"},{"version":"3.11.0","status":"affected","lessThan":"3.11.8","versionType":"custom"},{"version":"3.12.0","status":"affected","lessThan":"3.12.1","versionType":"custom"},{"version":"3.13.0a1","status":"affected","lessThan":"3.13.0a3","versionType":"custom"}],"cpes":["cpe:2.3:a:python_software_foundation:cpython:*:*:*:*:*:*:*:*"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-11-05T19:08:44.665083Z","id":"CVE-2023-6597","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"type":"CWE","lang":"en","description":"CWE-noinfo Not enough information"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-05T19:16:27.862Z"}},{"title":"CVE Program Container","references":[{"url":"https://github.com/python/cpython/commit/81c16cd94ec38d61aa478b9a452436dc3b1b524d","tags":["patch","x_transferred"]},{"url":"https://github.com/python/cpython/commit/6ceb8aeda504b079fef7a57b8d81472f15cdd9a5","tags":["patch","x_transferred"]},{"url":"https://github.com/python/cpython/commit/5585334d772b253a01a6730e8202ffb1607c3d25","tags":["patch","x_transferred"]},{"url":"https://github.com/python/cpython/commit/8eaeefe49d179ca4908d052745e3bb8b6f238f82","tags":["patch","x_transferred"]},{"url":"https://github.com/python/cpython/commit/d54e22a669ae6e987199bb5d2c69bb5a46b0083b","tags":["patch","x_transferred"]},{"url":"https://github.com/python/cpython/commit/02a9259c717738dfe6b463c44d7e17f2b6d2cb3a","tags":["patch","x_transferred"]},{"url":"https://github.com/python/cpython/issues/91133","tags":["issue-tracking","x_transferred"]},{"url":"https://mail.python.org/archives/list/security-announce@python.org/thread/Q5C6ATFC67K53XFV4KE45325S7NS62LD/","tags":["vendor-advisory","x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/03/msg00025.html","tags":["x_transferred"]},{"url":"http://www.openwall.com/lists/oss-security/2024/03/20/5","tags":["x_transferred"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/T3IGRX54M7RNCQOXVQO5KQKTGWCOABIM/","tags":["x_transferred"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/U5VHWS52HGD743C47UMCSAK2A773M2YE/","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/12/msg00000.html"},{"url":"https://lists.debian.org/debian-lts-announce/2024/11/msg00005.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T21:50:47.799Z"}}]}}}