Vulnerability · Published Feb 27, 2025 · Assigned by GitHub_M
CVE-2025-27154Spotipy's cache file, containing spotify auth token, is created with overly broad permissions
High 8.4
In plain English
A high-severity incorrect default permissions in spotipy from spotipy-dev. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 49% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:13 | spotipy | 2.25.1-1 | DEBIAN-CVE-2025-27154 |
| Debian:14 | spotipy | 2.25.1-1 | DEBIAN-CVE-2025-27154 |
| PyPI | spotipy | 2.25.1 | PYSEC-2026-1936 |
| PyPI | spotipy | 2.25.1 | GHSA-pwhh-q4h6-w599 |
| Ubuntu:25.10 | spotipy | no fix listed | UBUNTU-CVE-2025-27154 |
| Ubuntu:26.04:LTS | spotipy | no fix listed | UBUNTU-CVE-2025-27154 |
| Ubuntu:26.10 | spotipy | no fix listed | UBUNTU-CVE-2025-27154 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| spotipy-dev | spotipy | < 2.25.1 |
Weakness: CWE-276 · Vector: CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
References
- https://github.com/spotipy-dev/spotipy/security/advisories/GHSA-pwhh-q4h6-w599 x_refsource_CONFIRM
- https://github.com/spotipy-dev/spotipy/commit/1ca453f6ef87a2a9e9876f52b6cb38d13532ccf2 x_refsource_MISC
- https://github.com/spotipy-dev/spotipy/blob/master/spotipy/cache_handler.py#L93-L98 x_refsource_MISC
- https://github.com/spotipy-dev/spotipy/releases/tag/2.25.1 x_refsource_MISC