spotipy: Exposure of Data Element to Wrong Session
CVE-2025-47928 is a critical-severity exposure of data element to wrong session vulnerability in spotipy from Spotipy-dev, with a CVSS 3.1 base score of 9.1 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected spotipy versions: = 4f5759dbfb4506c7b6280572a4db1aabc1ac778d. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.63% chance of exploitation within 30 days, higher than 51% of scored CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Check which version of spotipy you run against the affected versions below, and install the vendor's latest release.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Spotipy-dev | spotipy | = 4f5759dbfb4506c7b6280572a4db1aabc1ac778d | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- NoneAvailability is not affected.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N. Scored by CNA (github.com).
Official description
Spotipy is a Python library for the Spotify Web API. As of commit 4f5759dbfb4506c7b6280572a4db1aabc1ac778d, using `pull_request_target` on `.github/workflows/integration_tests.yml` followed by the checking out the head.sha of a forked PR can be exploited by attackers, since untrusted code can be executed having full access to secrets (from the base repo). By exploiting the vulnerability is possible to exfiltrate `GITHUB_TOKEN` and secrets `SPOTIPY_CLIENT_ID`, `SPOTIPY_CLIENT_SECRET`. In particular `GITHUB_TOKEN` which can be used to completely overtake the repo since the token has content write privileges. The `pull_request_target` in GitHub Actions is a major security concern—especially in public repositories—because it executes untrusted code from a PR, but with the context of the base repository, including access to its secrets. Commit 9dfb7177b8d7bb98a5a6014f8e6436812a47576f reverted the change that caused the issue.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Exposure of Data Element to Wrong Session
The product does not sufficiently enforce boundaries between the states of different sessions, causing data to be provided to, or used by, the wrong session.
How developers prevent this class of flaw
- Protect the application's sessions from information leakage. Make sure that a session's data is not used or visible by other sessions.
- Use a static analysis tool to scan the code for information leakage vulnerabilities (e.g. Singleton Member Field).
- In a multithreading environment, storing user data in Servlet member fields introduces a data access race condition. Do not use member fields to store information in the Servlet.
More Exposure of Data Element to Wrong Session vulnerabilities (CWE-488)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: poc, automatable: yes, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
Other vulnerabilities in spotipy
- 9.8 Critical severity
Recent Exposure of Data Element to Wrong Session vulnerabilities
- 8.3 High severity
- 7.5 High severity
- 7.5 High severity
- 8.0 High severity
- 9.6 Critical severity
- 7.5 High severity
Spotted an error? Tell us.