PyPi: Spotipy

CVE-2025-27154

Safety vulnerability ID: 75648

This vulnerability was reviewed by experts

The information on this page was manually curated by our Cybersecurity Intelligence Team.

Created at Feb 27, 2025 Updated at Apr 07, 2025
Scan your Python projects for vulnerabilities →

Advisory

Affected versions of Spotify are vulnerable Incorrect Default Permissions. Cache file, containing spotify auth token, is created with overly broad permissions.

Affected package

spotipy

Latest version: 2.25.1

A light weight Python library for the Spotify Web API

Affected versions

Fixed versions

Vulnerability changelog

Added

- Added examples for audiobooks, shows and episodes methods to examples directory

Fixed

- Fixed scripts in examples directory that didn't run correctly
- Updated documentation for `Client.current_user_top_artists` to indicate maximum number of artists limit
- Set auth cache file permissions to `600`: https://github.com/spotipy-dev/spotipy/security/advisories/GHSA-pwhh-q4h6-w599

Changed

- Updated get_cached_token and save_token_to_cache methods to utilize Python's Context Management Protocol
- Added except clause to get_cached_token method to handle json decode errors
- Added warnings and updated docs due to Spotify's deprecation of HTTP and "localhost" redirect URIs
- Use newer string formatters (<https://pyformat.info>)
- Marked `recommendation_genre_seeds` as deprecated

Resources

Use this package?

Scan your Python project for dependency vulnerabilities in two minutes

Scan your application

Severity Details

CVSS Base Score

CRITICAL 9.8

CVSS v3 Details

CRITICAL 9.8
Attack Vector (AV)
NETWORK
Attack Complexity (AC)
LOW
Privileges Required (PR)
NONE
User Interaction (UI)
NONE
Scope (S)
UNCHANGED
Confidentiality Impact (C)
HIGH
Integrity Impact (I)
HIGH
Availability Availability (A)
HIGH