CVE-2025-66040: PYSEC-2026-1937 - Spotipy has a XSS vulnerability in its OAuth callback server
CVE-2025-66040 · Severity: low · CVSS 3.6 · Published 2025-11-27
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.
Yes. spotipy (PyPI): upgrade to 2.25.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2025-66040?
Check whether you run spotipy (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.