{"answers":{"affected":"3 open source packages ship an affected version, including libpython, python and python-min.","exploited":"There is no known exploitation of CVE-2023-6597 in the wild and no public exploit code.","fix":"Upgrade libpython to a fixed version for your release line: 3.8.19, 3.9.19, 3.10.14 or 3.11.8.","what":"CVE-2023-6597 is a high-severity path traversal vulnerability in CPython, published on 19 Mar 2024. It can only be exploited from the same machine or local network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-6597 and fix it if it is affected.\n\nWhat it is: CVE-2023-6597 is a high-severity path traversal vulnerability in CPython, published on 19 Mar 2024. It can only be exploited from the same machine or local network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2023-6597 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- libpython (Bitnami): affected all versions; fixed in 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.1\n- python (Bitnami): affected all versions; fixed in 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.1\n- python-min (Bitnami): affected all versions; fixed in 3.8.19, 3.9.19, 3.10.14, 3.11.8, 3.12.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-6597/ (Markdown: https://insights.sbomify.com/CVE-2023-6597/index.md)","id":"CVE-2023-6597","markdown":"https://insights.sbomify.com/CVE-2023-6597/index.md","name":"CVE-2023-6597","record":{"aliases":["ALPINE-CVE-2023-6597","ALSA-2024:4077","AZL-35926","AZL-35949","BELL-CVE-2023-6597","BIT-libpython-2023-6597","BIT-python-2023-6597","BIT-python-min-2023-6597","CLSA-2024-1720547879","CLSA-2024-1720548714","CLSA-2025-1740479778","CLSA-2025-1740645307","CLSA-2025-1740645424","DEBIAN-CVE-2023-6597","GHSA-797f-63wg-8chv","PSF-2024-1","RHSA-2024:4077","RHSA-2024:4166","RHSA-2024:4370","RHSA-2024:4456","RHSA-2024:4896","RHSA-2024:5535","RHSA-2024:5689","RLSA-2024:4077","SUSE-SU-2024:0820-1","SUSE-SU-2024:0850-1","UBUNTU-CVE-2023-6597","openSUSE-SU-2024:13736-1","openSUSE-SU-2024:13739-1","openSUSE-SU-2024:13740-1","openSUSE-SU-2024:13741-1","openSUSE-SU-2024:13744-1"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["privilege_escalation","data_modify"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python standard library","requires_auth":"none","summary":"Attackers can modify permissions of files referenced by symlinks via TemporaryDirectory cleanup, potentially leading to privilege escalation.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"PSF","cpe":[],"cvss":{"score":7.8,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:N","version":"3.1"},"cwes":[],"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.","ecosystems":["AlmaLinux:9","Bitnami","Red Hat:enterprise_linux:9::appstream","Red Hat:enterprise_linux:9::crb","Red Hat:rhel_aus:8.2::appstream","Red Hat:rhel_aus:8.2::baseos","Red Hat:rhel_aus:8.4::appstream","Red Hat:rhel_aus:8.4::baseos","Red Hat:rhel_e4s:8.4::appstream","Red Hat:rhel_e4s:8.4::baseos","Red Hat:rhel_e4s:9.0::appstream","Red Hat:rhel_e4s:9.0::baseos","Red Hat:rhel_eus:8.8::appstream","Red Hat:rhel_eus:8.8::crb","Red Hat:rhel_eus:9.2::appstream","Red Hat:rhel_eus:9.2::baseos","Red Hat:rhel_eus:9.2::crb","Red Hat:rhel_tus:8.4::appstream","Red Hat:rhel_tus:8.4::baseos","Rocky Linux:9","SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS","SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS","SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS","SUSE:Linux Enterprise Micro 5.1","SUSE:Linux Enterprise Server 15 SP2-LTSS","SUSE:Linux Enterprise Server 15 SP4-LTSS","SUSE:Linux Enterprise Server for SAP Applications 15 SP2","SUSE:Linux Enterprise Server for SAP Applications 15 SP4","openSUSE:Leap 15.5","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Path traversal in CPython","id":"CVE-2023-6597","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Bitnami","product":null,"products":[],"type":"path_traversal","year":"2023"},"n_packages":158,"n_references":12,"next":{"headline":"SpeedyCache \u003c= 1.1.3 - Missing Authorization to Plugin Options Update","id":"CVE-2023-6598"},"packages":[{"ecosystem":"Bitnami","fixed":["3.8.19","3.9.19","3.10.14","3.11.8","3.12.1"],"introduced":["0","3.9.0","3.10.0","3.11.0","3.12.0"],"last_affected":[],"package":"libpython","purl":"pkg:bitnami/libpython","source":"BIT-libpython-2023-6597"},{"ecosystem":"Bitnami","fixed":["3.8.19","3.9.19","3.10.14","3.11.8","3.12.1"],"introduced":["0","3.9.0","3.10.0","3.11.0","3.12.0"],"last_affected":[],"package":"python","purl":"pkg:bitnami/python","source":"BIT-python-2023-6597"},{"ecosystem":"Bitnami","fixed":["3.8.19","3.9.19","3.10.14","3.11.8","3.12.1"],"introduced":["0","3.9.0","3.10.0","3.11.0","3.12.0"],"last_affected":[],"package":"python-min","purl":"pkg:bitnami/python-min","source":"BIT-python-min-2023-6597"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11","purl":"pkg:rpm/almalinux/python3.11","source":"ALSA-2024:4077"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-debug","purl":"pkg:rpm/almalinux/python3.11-debug","source":"ALSA-2024:4077"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-devel","purl":"pkg:rpm/almalinux/python3.11-devel","source":"ALSA-2024:4077"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-idle","purl":"pkg:rpm/almalinux/python3.11-idle","source":"ALSA-2024:4077"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-libs","purl":"pkg:rpm/almalinux/python3.11-libs","source":"ALSA-2024:4077"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-test","purl":"pkg:rpm/almalinux/python3.11-test","source":"ALSA-2024:4077"},{"ecosystem":"AlmaLinux:9","fixed":["3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-tkinter","purl":"pkg:rpm/almalinux/python3.11-tkinter","source":"ALSA-2024:4077"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11","purl":"pkg:rpm/redhat/python3.11","source":"RHSA-2024:4077"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-debuginfo","purl":"pkg:rpm/redhat/python3.11-debuginfo","source":"RHSA-2024:4077"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-debugsource","purl":"pkg:rpm/redhat/python3.11-debugsource","source":"RHSA-2024:4077"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-devel","purl":"pkg:rpm/redhat/python3.11-devel","source":"RHSA-2024:4077"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-libs","purl":"pkg:rpm/redhat/python3.11-libs","source":"RHSA-2024:4077"},{"ecosystem":"Red Hat:enterprise_linux:9::appstream","fixed":["0:3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-tkinter","purl":"pkg:rpm/redhat/python3.11-tkinter","source":"RHSA-2024:4077"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11","purl":"pkg:rpm/redhat/python3.11","source":"RHSA-2024:4077"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-debug","purl":"pkg:rpm/redhat/python3.11-debug","source":"RHSA-2024:4077"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-debuginfo","purl":"pkg:rpm/redhat/python3.11-debuginfo","source":"RHSA-2024:4077"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-debugsource","purl":"pkg:rpm/redhat/python3.11-debugsource","source":"RHSA-2024:4077"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-idle","purl":"pkg:rpm/redhat/python3.11-idle","source":"RHSA-2024:4077"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-test","purl":"pkg:rpm/redhat/python3.11-test","source":"RHSA-2024:4077"},{"ecosystem":"Red Hat:enterprise_linux:9::crb","fixed":["0:3.11.7-1.el9_4.1"],"introduced":["0"],"last_affected":[],"package":"python3.11-tkinter","purl":"pkg:rpm/redhat/python3.11-tkinter","source":"RHSA-2024:4077"},{"ecosystem":"Red Hat:rhel_aus:8.2::appstream","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"platform-python","purl":"pkg:rpm/redhat/platform-python","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.2::appstream","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"platform-python-debug","purl":"pkg:rpm/redhat/platform-python-debug","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.2::appstream","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"platform-python-devel","purl":"pkg:rpm/redhat/platform-python-devel","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.2::appstream","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"python3-debuginfo","purl":"pkg:rpm/redhat/python3-debuginfo","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.2::appstream","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"python3-debugsource","purl":"pkg:rpm/redhat/python3-debugsource","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.2::appstream","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"python3-idle","purl":"pkg:rpm/redhat/python3-idle","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.2::appstream","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"python3-test","purl":"pkg:rpm/redhat/python3-test","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.2::appstream","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"python3-tkinter","purl":"pkg:rpm/redhat/python3-tkinter","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.2::baseos","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"platform-python","purl":"pkg:rpm/redhat/platform-python","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.2::baseos","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"python3","purl":"pkg:rpm/redhat/python3","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.2::baseos","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"python3-debuginfo","purl":"pkg:rpm/redhat/python3-debuginfo","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.2::baseos","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"python3-debugsource","purl":"pkg:rpm/redhat/python3-debugsource","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.2::baseos","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"python3-libs","purl":"pkg:rpm/redhat/python3-libs","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.2::baseos","fixed":["0:3.6.8-24.el8_2.3"],"introduced":["0"],"last_affected":[],"package":"python3-test","purl":"pkg:rpm/redhat/python3-test","source":"RHSA-2024:4166"},{"ecosystem":"Red Hat:rhel_aus:8.4::appstream","fixed":["0:3.6.8-39.el8_4.5"],"introduced":["0"],"last_affected":[],"package":"platform-python","purl":"pkg:rpm/redhat/platform-python","source":"RHSA-2024:4456"},{"ecosystem":"Red Hat:rhel_aus:8.4::appstream","fixed":["0:3.6.8-39.el8_4.5"],"introduced":["0"],"last_affected":[],"package":"platform-python-debug","purl":"pkg:rpm/redhat/platform-python-debug","source":"RHSA-2024:4456"},{"ecosystem":"Red Hat:rhel_aus:8.4::appstream","fixed":["0:3.6.8-39.el8_4.5"],"introduced":["0"],"last_affected":[],"package":"platform-python-devel","purl":"pkg:rpm/redhat/platform-python-devel","source":"RHSA-2024:4456"}],"prev":{"headline":"Openshift: incomplete fix for rapid reset (cve-2023-44487/cve-2023-39325)","id":"CVE-2023-6596"},"products":["CPython"],"published":"2024-03-19","related":[],"sources":[{"class":"attribution","licence":"MIT","name":"AlmaLinux","prefix":"ALSA"},{"class":"attribution","licence":"Apache-2.0","name":"Bitnami","prefix":"BIT"},{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"Red Hat","prefix":"RHSA"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-11-03","vendors":["Python Software Foundation"]},"summary":"Attackers can modify permissions of files referenced by symlinks via TemporaryDirectory cleanup, potentially leading to privilege escalation.","url":"https://insights.sbomify.com/CVE-2023-6597/"}