Skip to main content
CVE-2025-66040VulnerabilityPublished Updated

CVE-2025-66040: spotipy · Cross-site Scripting

Affects spotipySource CVE Database V5

0

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

Data as of 25 Oct 2026, 19:02 UTC

CVSS 3.1 base score
3.6Low
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.1% chance of exploitation in 30 days – higher than 4% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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. Weaponised: 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 2026-10-25.

What to do

Upgrade spotipy to 2.25.2.

Affected software

ProductAffectedFixed in
PyPIspotipypkg:pypi/spotipyOther threatsAffected
  • <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

To mitigate CVE-2025-66040, European organizations should immediately upgrade all Spotipy library instances to version 2.25.2 or later, where the vulnerability is patched. Developers should audit their OAuth callback implementations to ensure proper input validation and sanitization of all parameters, especially those reflected in web pages. Implement Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts in browsers. Conduct security reviews and penetration testing of OAuth flows to detect any residual injection vectors. Educate developers on secure coding practices related to web input handling and OAuth integration. Monitor application logs for suspicious OAuth callback requests containing unusual or encoded script content. If upgrading is not immediately possible, consider implementing web application firewalls (WAF) rules to detect and block malicious payloads targeting the error parameter. Finally, maintain awareness of Spotipy releases and security advisories to promptly address future vulnerabilities.

Description

Spotipy is a Python library for the Spotify Web API. Prior to version 2.25.2, there is a cross-site scripting (XSS) vulnerability in the OAuth callback server that allows for JavaScript injection through the unsanitized error parameter. Attackers can execute arbitrary JavaScript in the user's browser during OAuth authentication. This issue has been patched in version 2.25.2.

References

Community reviews

Loading reviews…