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.