/

CVE-2026-49338

Severity:

HIGH RISK

(7.1)

Broken Playlist Authorization (CWE-285) in Gonic API

CVE-2026-49338

Deferred

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-285, CWE-639

Impact:

Unauthorized Data Access and Data Destruction

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Gonic's Subsonic API endpoints for fetching and deleting playlists fail to enforce per-playlist authorization, allowing any authenticated user to operate on any playlist ID.

Under these conditions, a low-privileged user can read private playlists or delete playlists belonging to other users, including administrators, simply by guessing or learning their IDs.

Affected context

This vulnerability appears in Gonic deployments that expose the Subsonic-compatible API and rely on multi-user separation for playlist privacy.

It specifically affects the /rest/getPlaylist.view and /rest/deletePlaylist.view endpoints when they use only global authentication (logged-in user) without checking whether the caller is allowed to access or modify the targeted playlist.

The risk is highest in environments with multiple users, shared servers, or untrusted users, where playlist identifiers are guessable or have been previously exposed.

Exploit preconditions

  • Attack surface: HTTP(S) Subsonic API endpoints /rest/getPlaylist.view and /rest/deletePlaylist.view.
  • Required access: Any valid authenticated user account (not necessarily admin).
  • Trigger point: Issuing API requests that reference playlist id values belonging to other users.
  • Why exploitation is possible: The API validates that the caller is logged in but does not enforce ownership or permission checks for the specific playlist resource (per-resource authorization is missing). Playlist IDs are derived from base64url("<userID>/<filename>.m3u"), making them guessable or reusable once exposed.

Why this happens

The core problem is a missing authorization check at the object level.

While the application authenticates users, the playlist endpoints trust any authenticated caller to operate on any playlist identifier without verifying ownership or access rights.

This maps to CWE-285: Improper Authorization and is closely related to CWE-639: Authorization Bypass Through User-Controlled Key, where a user-supplied identifier (the playlist id) is accepted without validating that it belongs to the requesting user.

From a design perspective, the API conflates authentication with authorization, assuming that being logged in is sufficient to access or delete arbitrary playlist resources.

Potential impact

  • A non-admin user can delete any other user's playlists, including administrator playlists.
  • A user can read the full contents of any private playlist for which they can obtain or guess the id.
  • Loss of curated or business-critical playlists and associated metadata.
  • Privacy violations where private listening habits or curated lists are exposed to other users.
  • Erosion of trust in multi-user deployments where users expect strong separation of their media collections.

General mitigation guidance

Effective mitigation centers on enforcing strict, per-resource authorization and reducing reliance on guessable identifiers:

  • Introduce explicit ownership or access control checks in playlist handlers so that operations are only permitted when the requesting user is the owner or has specific delegated rights.
  • Treat playlist IDs as untrusted input; always verify that the resolved resource belongs to, or is legitimately shared with, the caller before returning data or performing destructive actions.
  • Avoid using easily guessable or user-derived identifiers as security boundaries; consider separating public identifiers from internal ownership keys and avoiding encoding predictable values (like <userID>/<filename>) directly into IDs.
  • Apply least-privilege principles so that authenticated users have only the minimal actions necessary on their own playlists and no implicit cross-user access.
  • Log authorization decisions for sensitive operations (like deletion) to support auditing and anomaly detection.

How teams detect issues like this

Detection efforts can focus on both code-level patterns and runtime behavior:

  • Code review: Look for controller or handler functions where only authentication is enforced (e.g., "user is logged in") but no ownership or permission checks are made on resource identifiers such as playlist IDs.
  • Static analysis: Configure rules to flag endpoints that accept identifiers (IDs, UUIDs, filenames) in request parameters but do not verify that the underlying object belongs to the requesting user.
  • API contract checks: Use automated tests or security scanners that attempt cross-user operations, such as reading or deleting resources by replaying IDs from one account using another account.
  • Runtime monitoring: Analyze access logs for patterns where many distinct playlist IDs are accessed by a single low-privileged user, or where a user accesses playlists that do not match their account context.

Sources

SourceLink
github.comgithub.com/sentriz/gonic/commit/6dd71e6
github.comgithub.com/sentriz/gonic/security/advisories/GHSA-hmgp-w9jm-vp95

Frequently asked

questions

Yes, if the Gonic Subsonic API is exposed over the network and an attacker can obtain any valid user credentials, the issue can be exploited remotely via crafted HTTP requests.

No. Any authenticated user, including low-privileged or regular accounts, can attempt to read or delete other users' playlists by supplying their playlist IDs.

The safest pattern is to implement strict per-resource authorization checks: for every playlist operation, resolve the playlist by its ID, verify that it belongs to the requesting user (or that they have an explicit right to access it), and only proceed if this check passes. Treat the playlist ID purely as a lookup key, not as proof of access.

Design APIs with a clear separation between authentication and authorization, enforce ownership checks for all user-owned resources, and adopt security-focused code review and testing practices (including IDOR tests) to ensure that object-level access control is consistently applied across endpoints.

Find out what's already
exploitable in your codebase.