CVE-2025-27154
Spotipy's cache file, containing spotify auth token, is created with overly broad permissions
Check your servers for CVE-2025-27154
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-27154 affects spotipy, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
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
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Attack requirements
- none: an attack works without special conditions on the target
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Impact on the vulnerable system
- confidentiality high, integrity high, availability none: what an attacker can read, change or stop in the vulnerable component
- Impact on other systems
- confidentiality none, integrity none, availability none: what an attacker can read, change or stop beyond it
Exploitation
EPSS 0.61%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 50.5% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 27 Feb 2025):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-276 Incorrect Default Permissions
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| spotipy |
affected < 2.25.1
|
Is my server affected?
Find the installed version of spotipy and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i spotipy
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2025-27154 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2025-27154RHEL, Rocky, Alma, Fedora
rpm -q spotipy
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2025-27154Alpine
apk list --installed | grep -i spotipyWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2025-27154
trivy image --scanners vuln IMAGE | grep CVE-2025-27154
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Exploits and proof of concept
- https://github.com/spotipy-dev/spotipy/security/advisories/GHSA-pwhh-q4h6-w599 github.com · exploit
Other references
- https://github.com/spotipy-dev/spotipy/commit/1ca453f6ef87a2a9e9876f52b6cb38d13532ccf2 github.com
- https://github.com/spotipy-dev/spotipy/blob/master/spotipy/cache_handler.py#L93-L98 github.com
- https://github.com/spotipy-dev/spotipy/releases/tag/2.25.1 github.com
Source: the record CVE-2025-27154 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse