spotipy Path traversal vulnerability that may lead to type confusion in URI handling code
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2023-23608
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 15:40 UTC · Revision 1
Source evidence
spotipy Path traversal vulnerability that may lead to type confusion in URI handling code
core-osv · Original sourcePublished 24 Jan 2023, 02:39 UTC
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.
osv:CVE-2023-23608
Complete source record
{
"id": "08cc000a0d2b80ace8516e5663727b622325151166bdae68b0e2750ee53da386",
"url": "https://osv.dev/vulnerability/CVE-2023-23608",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "spotipy Path traversal vulnerability that may lead to type confusion in URI handling code",
"summary": "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.",
"evidence": "osv:CVE-2023-23608",
"products": [],
"severity": "unknown",
"structured": {
"id": "CVE-2023-23608",
"aliases": [
"CVE-2023-23608",
"GHSA-q764-g6fm-555v",
"PYSEC-2026-926"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/spotipy-dev/spotipy",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "c53511bbbe87f89c2aeaa65bef584539db440f97"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "2.22.1"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"cpe": "cpe:2.3:a:spotipy_project:spotipy:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "2.22.1"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"2.22.0",
"2.21.0",
"2.20.0",
"2.19.0",
"2.18.0",
"2.17.1",
"2.17.0",
"2.16.1",
"2.16.0",
"2.15.0",
"2.14.0",
"2.13.0",
"2.12.0",
"2.11.2",
"2.11.1",
"2.11.0",
"2.10.0",
"2.9.0",
"2.8.0",
"2.7.1",
"2.7.0",
"2.6.3",
"2.6.2",
"2.6.1",
"2.6.0",
"2.5.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-23608.json"
}
}
],
"modified": "2026-10-28T02:30:37.213869637Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/23xxx/CVE-2023-23608.json",
"https://github.com/spotipy-dev/spotipy/security/advisories/GHSA-q764-g6fm-555v",
"https://nvd.nist.gov/vuln/detail/CVE-2023-23608"
],
"provider_metadata": {
"cwe_ids": [
"CWE-22"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/23xxx/CVE-2023-23608.json"
}
},
"related_cves": [
{
"value": "CVE-2023-23608",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 504191,
"published_at": "2023-01-24T02:39:32.471+00:00"
}