Security Resilience

CVE-2025-27154

Spotipy Project Spotipy ≤ 2.25.1

Public PoC
Published
27 February 2025
Modified
07 April 2025
Patch / advisory
CVSS Score v4 8.4
Click a component to see what it means
Raw vectorCVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS Score 0.0061 49th percentile
Risk Priority 34 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2025-27154 is a high-severity Incorrect Default Permissions (CWE-276) vulnerability in Spotipy Project Spotipy. Its CVSS base score is 8.4 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Executable Installer File Permissions Weakness (T1574.005); ranked at the 49th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to AC-3 (Access Enforcement) and AC-6 (Least Privilege) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2025-27154 is a vulnerability in Spotipy, a lightweight Python library for interacting with the Spotify Web API. The issue affects the CacheHandler class, which creates a cache file to store Spotify authentication tokens. In versions prior to 2.25.1, this file is created with overly permissive rw-r--r-- (644) permissions by default, rather than the more secure rw------- (600) permissions. This misconfiguration, classified under CWE-276 (Incorrect Default Permissions), exposes the authentication token to unauthorized access and has a CVSS v3.1 base score of 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

An attacker with local access to the system—such as another user on the same machine or a process running under a different user—can read the cache file containing the Spotify auth token. Once obtained, the token can be exploited remotely to perform administrative actions on the victim's Spotify account, depending on the scopes granted during authentication. The high CVSS score reflects the potential for network-based impact through token misuse, despite the local prerequisite for file access.

The Spotipy security advisory (GHSA-pwhh-q4h6-w599) and release notes recommend upgrading to version 2.25.1, which patches the issue by tightening cache file permissions to rw------- (600). The fix is implemented in commit 1ca453f6ef87a2a9e9876f52b6cb38d13532ccf2, visible in the updated cache_handler.py code. Practitioners should audit systems using vulnerable Spotipy versions and ensure proper file permissions on existing cache files.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1574.005 Executable Installer File Permissions Weakness Stealth
Adversaries may execute their own malicious payloads by hijacking the binaries used by an installer.
T1554 Compromise Host Software Binary Persistence
Adversaries may modify host software binaries to establish persistent access to systems.
T1574.010 Services File Permissions Weakness Stealth
Adversaries may execute their own malicious payloads by hijacking the binaries used by services.
T1685.006 Clear Linux or Mac System Logs Defense Impairment
Adversaries may clear system logs to hide evidence of an intrusion.
T1078.003 Local Accounts Stealth
Adversaries may obtain and abuse credentials of a local account as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion.
T1080 Taint Shared Content Lateral Movement
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2023-23608Same product: Spotipy Project Spotipy
CVE-2024-47240Shared CWE-276
CVE-2023-30902Shared CWE-276
CVE-2024-4030Shared CWE-276
CVE-2023-42953Shared CWE-276
CVE-2023-4088Shared CWE-276
CVE-2025-24234Shared CWE-276
CVE-2026-110359Shared CWE-276
CVE-2023-28389Shared CWE-276
CVE-2025-8432Shared CWE-276

Affected Assets

spotipy project
spotipy
≤ 2.25.1

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

—

Detect
Catch it (NIST detect / respond)

—

Harden
Shrink the surface (DISA STIG)
  • 7 hardening rules · 2 OS baselines
Validate
Prove the fix (OWASP ASVS)

—

Mitigating Controls (NIST 800-53 r5) AI

Enforces approved authorizations on files and resources so overly permissive defaults cannot be exploited.

Requires least-privilege defaults so that installed files are not world-writable by default.

Requires documented, restrictive configuration settings that cover file and directory permissions.

Enforces access restrictions on changes, including permission settings applied during installation or configuration.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-01 full match
blocks

Hardened baselines and configuration management explicitly require correct default file permissions.

PR.AA-05 mostly match
blocks

Defining and enforcing least-privilege access permissions directly prevents overly permissive defaults at install time.

ID.AM-08 partial match
blocks

Lifecycle management can encompass permission settings, yet the control is too broad to specifically mitigate incorrect defaults.

PR.PS-06 partial match
blocks

Secure SDLC practices include establishing secure defaults, but address only the development-phase portion of the weakness.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

blocks

Standard templates that restrict access to utility programs and host parameter settings prevent the assignment of overly permissive default permissions on critical resources.

Hardening callouts derived

Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over `controls_xwalks` (higher-evidence rows only; rows rated `none` are excluded).

Windows Server 2016 (2 rules)
  • V-224833 Permissions for program file directories must conform to minimum requirements. blocks CWE-276
  • V-224834 Permissions for the Windows installation directory must conform to minimum requirements. blocks CWE-276
Windows Server 2019 (2 rules)
  • V-205735 Windows Server 2019 permissions for program file directories must conform to minimum requirements. blocks CWE-276
  • V-205736 Windows Server 2019 permissions for the Windows installation directory must conform to minimum requirements. blocks CWE-276

References