{"answers":{"affected":"3 open source packages ship an affected version, including spotipy.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-66040 exists.","fix":"Upgrade spotipy to 2.25.2 or later.","what":"CVE-2025-66040 is a low-severity cross-site scripting vulnerability in spotipy-dev spotipy, published on 26 Nov 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-66040 and fix it if it is affected.\n\nWhat it is: CVE-2025-66040 is a low-severity cross-site scripting vulnerability in spotipy-dev spotipy, published on 26 Nov 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-66040 exists.\n\nAffected packages and fixed versions:\n- spotipy (PyPI): affected all versions; fixed in 2.25.2\n- spotipy (PyPI): affected all versions; fixed in 2.25.2\n- spotipy (PyPI): affected all versions; fixed in 2.25.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-66040/ (Markdown: https://insights.sbomify.com/CVE-2025-66040/index.md)","id":"CVE-2025-66040","markdown":"https://insights.sbomify.com/CVE-2025-66040/index.md","name":"CVE-2025-66040","record":{"aliases":["DEBIAN-CVE-2025-66040","GHSA-r77h-rpp9-w2xm","PYSEC-2026-1937","UBUNTU-CVE-2025-66040","openSUSE-SU-2025:15777-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"Python Spotify API library","requires_auth":"none","summary":"Attackers can execute arbitrary JavaScript in users' browsers via unsanitized error parameters in the Spotipy OAuth callback server.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":3.6,"severity":"low","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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.","ecosystems":["PyPI","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Spotipy has a XSS vulnerability in OAuth callback server","id":"CVE-2025-66040","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xss","year":"2025"},"n_packages":4,"n_references":2,"next":{"headline":"Information disclosure in Affinity","id":"CVE-2025-66042"},"packages":[{"ecosystem":"PyPI","fixed":["2.25.2"],"introduced":["0"],"last_affected":[],"package":"spotipy","purl":null,"source":"GHSA-r77h-rpp9-w2xm"},{"ecosystem":"PyPI","fixed":["2.25.2"],"introduced":["0"],"last_affected":[],"package":"spotipy","purl":"pkg:pypi/spotipy","source":"GHSA-r77h-rpp9-w2xm"},{"ecosystem":"PyPI","fixed":["2.25.2"],"introduced":["0"],"last_affected":[],"package":"spotipy","purl":"pkg:pypi/spotipy","source":"PYSEC-2026-1937"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["2.25.2-1.1"],"introduced":["0"],"last_affected":[],"package":"python-spotipy","purl":"pkg:rpm/opensuse/python-spotipy\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2025:15777-1"}],"prev":{"headline":"FreePBX Endpoint Manager Allows Unauthenticated Logins to Administrator Control Panel via Forged Basic Auth Header","id":"CVE-2025-66039"},"products":["spotipy"],"published":"2025-11-26","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CC BY 4.0","name":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-11-28","vendors":["spotipy-dev"]},"summary":"Attackers can execute arbitrary JavaScript in users' browsers via unsanitized error parameters in the Spotipy OAuth callback server.","url":"https://insights.sbomify.com/CVE-2025-66040/"}