Skip to main content
VulnerabilityPublished

CVE-2025-66040: Spotipy Has a XSS Vulnerability

Affects spotipySource GCVE Database

0
Compare
Authoritative record:CVE-2025-66040· Low 3.6

Not known to be exploited · CVSS 3.6 Low : upgrade to 2.25.2 when convenient.

Data as of 21 Nov 2026, 03:38 UTC

CVSS 3.1 base score
3.6Low
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 3.13.6
Patch
Available – fixed in 2.25.2
CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 26 Nov 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 20 Nov 2026.

What to do

Upgrade spotipy to 2.25.2.

Affected software

ProductAffectedFixed in
PyPIspotipyAffected
  • <2.25.2
Fixed in
  • 2.25.2

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

A patch is available in spotipy version 2.25.2 that fixes this vulnerability by applying HTML escaping to the 'error' parameter before reflecting it in the OAuth callback server's HTML response. Users and administrators should upgrade to version 2.25.2 or later to remediate this issue. No additional mitigations are required once the patch is applied.

Description

Spotipy versions prior to 2.25.2 contain a cross-site scripting (XSS) vulnerability in the OAuth callback server. The vulnerability arises because the local HTTP server used during OAuth authentication reflects the 'error' URL parameter into HTML without proper sanitization. This allows an attacker to inject arbitrary JavaScript code that executes in the user's browser on the localhost origin. The vulnerability requires user interaction and timing during the OAuth flow. A fix is available in version 2.25.2 that applies HTML escaping to the reflected error parameter.

References

Community reviews

Loading reviews…