CVE-2025-27154Spotipy's cache file, containing spotify auth token, is created with overly broad…
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.
What to do
Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | spotipy | Fix pending | UBUNTU-CVE-2025-27154 | |
| Ubuntu 26.04 | spotipy | Under investigation | UBUNTU-CVE-2025-27154 | |
| Ubuntu 25.10 | spotipy | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2025-27154 | |
| Debian 14 | spotipy | Fixed | 2.25.1-1 | DEBIAN-CVE-2025-27154 |
| Debian 13 | spotipy | Fixed | 2.25.1-1 | DEBIAN-CVE-2025-27154 |
| PyPI library | spotipy | Fixed | 2.25.1 | GHSA-pwhh-q4h6-w599 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- spotipy-dev spotipy: affected: < 2.25.1
References
- https://github.com/spotipy-dev/spotipy/security/advisories/GHSA-pwhh-q4h6-w599
- https://github.com/spotipy-dev/spotipy/commit/1ca453f6ef87a2a9e9876f52b6cb38d13532ccf2
- https://github.com/spotipy-dev/spotipy/blob/master/spotipy/cache_handler.py#L93-L98
- https://github.com/spotipy-dev/spotipy/releases/tag/2.25.1
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.