CVE-2025-27154CWE-276

Spotipy's cache file, containing spotify auth token, is created with overly broad permissions

High · published February 27, 2025

CVSS v4.0
8.4
EPSS
1%
Percentile
48.6
In the wild
Unconfirmed
What it is

⚡ A default file permission of `rw-r--r--` means your Spotify auth token could be openly read — like leaving your house key under the welcome mat for anyone to find! Think of the `CacheHandler` class as a digital filing cabinet. By default, it left the drawer slightly ajar, allowing anyone nearby to peek at sensitive documents inside, instead of locking it securely. An attacker who can read this cache file gains access to your Spotify account, potentially performing administrative actions like managing playlists or viewing private data. If that token falls into the wrong hands, it could lead to a total takeover — absolutely devastating for your personal music library!

Put simply

Think of the `CacheHandler` class as a digital filing cabinet. By default, it left the drawer slightly ajar, allowing anyone nearby to peek at sensitive documents inside, instead of locking it securely. This vulnerability stems from the `CacheHandler` class in Spotipy, which sets insecure file permissions for the token cache, allowing unauthorized users or processes to read it. The exposure could lead to unauthorized access to the Spotify account based on token permissions.

What to do

An attacker who can read this cache file gains access to your Spotify account, potentially performing administrative actions like managing playlists or viewing private data. If that token falls into the wrong hands, it could lead to a total takeover — absolutely devastating for your personal music library! Patch to version 2.25.1 or later immediately to enforce stricter file permissions. Additionally, review your current token permissions and consider regenerating them to safeguard your account. Always ensure that sensitive files are not overly exposed! You've got this! By following these steps, you'll be tightening up your security and keeping your Spotify account safe! 🛡️

The record
Technical detail
CVSS v4.0
8.4 · HIGH
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
EPSS
0.00611 · 48.6th percentile
Weakness
CWE-276 · Incorrect Default Permissions
Published
2025-02-27T13:53Z
EPSS history
Timeline
  • 27 FEB 13:53Z
    Spotipy's cache file, containing spotify auth token, is created with overly broad permissions
    cvelistv5