Skip to content
Heist/ feed
Back to feed
Critical

spotipy — security advisory

Type: advisorySources: OSVAdvisory ID: UBUNTU-CVE-2025-27154

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.

Products
spotipy
Affected versions
2.25.1-1, 2.25.2-1, 2.26.0-1
Fixed versions
Not specified
CVEs
CVE-2025-27154
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 01:26 UTC · Revision 1

Source evidence

UBUNTU-CVE-2025-27154

core-osv · Original source

Published 27 Feb 2025, 14:15 UTC

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.

osv:UBUNTU-CVE-2025-27154

spotipy

Fixed versions: Not specified

spotipy

Fixed versions: Not specified

spotipy

Fixed versions: Not specified

Complete source record
{
  "id": "d1f6c69e98ce2f3f915e68a37f31099f04bd3bc55ec1c8e840009b25395a0198",
  "url": "https://osv.dev/vulnerability/UBUNTU-CVE-2025-27154",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "UBUNTU-CVE-2025-27154",
    "summary": "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.",
    "evidence": "osv:UBUNTU-CVE-2025-27154",
    "products": [
      {
        "name": {
          "value": "spotipy",
          "evidence": "/affected/0/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.25.1-1",
            "evidence": "/affected/0/versions"
          }
        ]
      },
      {
        "name": {
          "value": "spotipy",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.25.2-1",
            "evidence": "/affected/1/versions"
          },
          {
            "value": "2.26.0-1",
            "evidence": "/affected/1/versions"
          }
        ]
      },
      {
        "name": {
          "value": "spotipy",
          "evidence": "/affected/2/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [],
        "affected_versions": [
          {
            "value": "2.25.1-1",
            "evidence": "/affected/2/versions"
          },
          {
            "value": "2.25.2-1",
            "evidence": "/affected/2/versions"
          }
        ]
      }
    ],
    "severity": "critical",
    "structured": {
      "id": "UBUNTU-CVE-2025-27154",
      "aliases": [
        "UBUNTU-CVE-2025-27154"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        },
        {
          "type": "CVSS_V4",
          "score": "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"
        },
        {
          "type": "Ubuntu",
          "score": "medium"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "spotipy",
            "purl": "pkg:deb/ubuntu/spotipy?arch=source&distro=questing",
            "ecosystem": "Ubuntu:25.10"
          },
          "versions": [
            "2.25.1-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-27154.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-spotipy",
                "binary_version": "2.25.1-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "spotipy",
            "purl": "pkg:deb/ubuntu/spotipy?arch=source&distro=stonking",
            "ecosystem": "Ubuntu:26.10"
          },
          "versions": [
            "2.25.2-1",
            "2.26.0-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-27154.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-spotipy",
                "binary_version": "2.26.0-1"
              }
            ]
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "0"
                }
              ]
            }
          ],
          "package": {
            "name": "spotipy",
            "purl": "pkg:deb/ubuntu/spotipy?arch=source&distro=resolute",
            "ecosystem": "Ubuntu:26.04:LTS"
          },
          "versions": [
            "2.25.1-1",
            "2.25.2-1"
          ],
          "database_specific": {
            "source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-27154.json"
          },
          "ecosystem_specific": {
            "binaries": [
              {
                "binary_name": "python3-spotipy",
                "binary_version": "2.25.2-1"
              }
            ]
          }
        }
      ],
      "modified": "2026-10-17T12:56:49.586134326Z",
      "provider": "osv",
      "upstream": [
        "CVE-2025-27154"
      ],
      "references": [
        "https://ubuntu.com/security/CVE-2025-27154",
        "https://www.cve.org/CVERecord?id=CVE-2025-27154",
        "https://github.com/spotipy-dev/spotipy/blob/master/spotipy/cache_handler.py#L93-L98",
        "https://github.com/spotipy-dev/spotipy/commit/1ca453f6ef87a2a9e9876f52b6cb38d13532ccf2",
        "https://github.com/spotipy-dev/spotipy/releases/tag/2.25.1",
        "https://github.com/spotipy-dev/spotipy/security/advisories/GHSA-pwhh-q4h6-w599"
      ]
    },
    "related_cves": [
      {
        "value": "CVE-2025-27154",
        "evidence": "/upstream"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 356404,
  "published_at": "2025-02-27T14:15:00+00:00"
}