{"answers":{"affected":"3 open source packages ship an affected version, including spotipy. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-23608 exists.","fix":"Upgrade spotipy to 2.22.1 or later.","what":"CVE-2023-23608 is a path traversal vulnerability in spotipy-dev spotipy, published on 24 Jan 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2023-23608 and fix it if it is affected.\n\nWhat it is: CVE-2023-23608 is a path traversal vulnerability in spotipy-dev spotipy, published on 24 Jan 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-23608 exists.\n\nAffected packages and fixed versions:\n- spotipy (PyPI): affected all versions; fixed in 2.22.1\n- spotipy (PyPI): affected all versions; fixed in 2.22.1\n- spotipy (PyPI): affected all versions; fixed in 2.22.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-23608/ (Markdown: https://insights.sbomify.com/CVE-2023-23608/index.md)","id":"CVE-2023-23608","markdown":"https://insights.sbomify.com/CVE-2023-23608/index.md","name":"CVE-2023-23608","record":{"aliases":["GHSA-q764-g6fm-555v","PYSEC-2026-926"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Spotify API library","requires_auth":"none","summary":"Attackers can manipulate URIs to redirect API requests to unintended endpoints, potentially exposing or modifying data.","user_interaction":"required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"spotipy","vendor":"spotipy_project"}],"cvss":{"score":0,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:N","version":"3.1"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"Spotipy is a light weight Python library for the Spotify Web API. In versions prior to 2.22.1, if a malicious URI is passed to the library, the library can be tricked into performing an operation on a different API endpoint than intended. The code Spotipy uses to parse URIs and URLs allows an attacker to insert arbitrary characters into the path that is used for API requests. Because it is possible to include \"..\", an attacker can redirect for example a track lookup via spotifyApi.track() to an arbitrary API endpoint like playlists, but this is possible for other endpoints as well. The impact of this vulnerability depends heavily on what operations a client application performs when it handles a URI from a user and how it uses the responses it receives from the API. This issue is patched in version 2.22.1.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"spotipy Path traversal vulnerability that may lead to type confusion in URI handling code","id":"CVE-2023-23608","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"path_traversal","year":"2023"},"n_packages":3,"n_references":1,"next":{"headline":"contiki-ng BLE-L2CAP contains Improper size validation of L2CAP frames","id":"CVE-2023-23609"},"packages":[{"ecosystem":"PyPI","fixed":["2.22.1"],"introduced":["0"],"last_affected":[],"package":"spotipy","purl":null,"source":"GHSA-q764-g6fm-555v"},{"ecosystem":"PyPI","fixed":["2.22.1"],"introduced":["0"],"last_affected":[],"package":"spotipy","purl":"pkg:pypi/spotipy","source":"GHSA-q764-g6fm-555v"},{"ecosystem":"PyPI","fixed":["2.22.1"],"introduced":["0"],"last_affected":[],"package":"spotipy","purl":"pkg:pypi/spotipy","source":"PYSEC-2026-926"}],"prev":{"headline":"Unrestricted file upload leads to Remote Code Execution in erohtar/Dasherr","id":"CVE-2023-23607"},"products":["spotipy"],"published":"2023-01-24","related":[{"cvss_score":8.4,"headline":"Spotipy's cache file, containing spotify auth token, is created with overly broad permissions","id":"CVE-2025-27154","kev_date_added":null,"published":"2025-02-27"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-03-10","vendors":["spotipy-dev"]},"summary":"Attackers can manipulate URIs to redirect API requests to unintended endpoints, potentially exposing or modifying data.","url":"https://insights.sbomify.com/CVE-2023-23608/"}