Spotipy's cache file, containing spotify auth token, is created with overly broad permissions
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub.
Summary
Spotipy is a lightweight Python library for the Spotify Web API. The `CacheHandler` class creates a cache file to store the auth token. Prior to version 2.25.1, the file created has `rw-r--r--` (644) permissions by default, when it could be locked down to `rw-------` (600) permissions. This leads to overly broad exposure of the spotify auth token. If this token can be read by an attacker (another user on the machine, or a process running as another user), it can be used to perform administrative actions on the Spotify account, depending on the scope granted to the token. Version 2.25.1 tightens the cache file permissions.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| spotipy-dev | spotipy | before 2.25.1 | 2.25.1 | Patch available | CNA |
| — | spotipy (PyPI) | before 2.25.1 | 2.25.1 | Patch available | GHSA-pwhh-q4h6-w599 |
- spotipy Vendorspotipy-dev Affected before 2.25.1 Fixed in 2.25.1 Patch available CNA
- spotipy (PyPI) Vendor— Affected before 2.25.1 Fixed in 2.25.1 Patch available GHSA-pwhh-q4h6-w599
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:spotipy_project:spotipy:*:*:*:*:*:*:*:* | before 2.25.1 | Vulnerable | Spotipy Project |
- cpe:2.3:a:spotipy_project:spotipy:*:*:*:*:*:*:*:* Versions before 2.25.1 Vulnerable ·Spotipy Project
Remediation
- Fix · CNA spotipy (spotipy-dev) Fixed in 2.25.1
- Fix · GHSA-pwhh-q4h6-w599 spotipy (PyPI) Fixed in 2.25.1 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2025-27154
- 2026-10-03 Alias added: GHSA-pwhh-q4h6-w599
References
More spotipy-dev vulnerabilities
- TI-2025-30321 Spotipy repo vulnerable to secrets exfiltration via `pull_request_target` CVSS 3.1CRITICAL 9.1
- TI-2025-40566 Spotipy has a XSS vulnerability in OAuth callback server CVSS 3.1LOW 3.6
Sources
- CVE-2025-27154 · CVE Program
- CVE-2025-27154 · NVD
- FIRST EPSS
- GHSA-pwhh-q4h6-w599 · GitHub Advisory Database · CC BY 4.0
- CVE-2025-27154 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences