/

CVE-2026-73971

Severity:

HIGH RISK

(8.0)

Code Injection (CWE-95) in Music Assistant API Endpoints

CVE-2026-73971

Received

Vulnerability type

Category:

Code Injection

CWE:

CWE-95

Impact:

Arbitrary Code Execution

Severity:

HIGH RISK

(8.0)

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

Music Assistant evaluates a caller-controlled type parameter when handling certain configuration and value lookup commands. Any authenticated user may be able to trigger arbitrary Python code execution with the server process's privileges, even if the request later fails validation.

Affected context

The vulnerability occurs in argument parsing for the config/core/get_value, config/providers/get_value, and config/players/get_value commands. Requests can reach these commands through the WebSocket /ws endpoint or REST JSON-RPC /api endpoint. The issue affects versions before 2.8.0, and a default installation does not require special configuration for the vulnerable behavior to be present.

Exploit preconditions

  • Attack surface: WebSocket /ws or REST JSON-RPC /api endpoint
  • Required access: Authentication; the description indicates no particular user role is required
  • Trigger point: Argument parsing for one of the affected get-value commands
  • Why exploitation is possible: A caller-controlled return_type is passed to Python eval() before command-handler validation

Why this happens

The argument parser uses a dynamic evaluation mechanism to resolve a type parameter supplied by the caller. Evaluating externally controlled input as code can allow arbitrary expressions to execute, matching CWE-95: Improper Neutralization of Directives in Dynamically Evaluated Code. Because evaluation occurs before command-handler validation, later rejection of a request does not prevent the earlier execution.

Potential impact

  • Arbitrary Python code may run with the Music Assistant server process's privileges.
  • Attackers could expose secrets or configuration data.
  • Library data could be altered.
  • The application container could be controlled or further compromised.

General mitigation guidance

Mitigation generally focuses on removing dynamic evaluation of caller-controlled values and narrowing the input trust boundary.

Common defensive patterns include:

  • Replacing eval() with explicit type maps, allowlists, or other non-executable parsing.
  • Validating type parameters against a strict schema before they are used.
  • Applying authorization checks and input validation before any parsing behavior with security impact.
  • Limiting the server process's privileges and access to secrets and sensitive data.
  • Restricting access to API endpoints to trusted users and networks where appropriate.

How teams detect issues like this

High-level detection approaches include:

  • Static analysis rules and code review searches for eval() or similar dynamic evaluation on request-derived values.
  • Reviewing argument-parsing paths to confirm validation and authorization happen before sensitive processing.
  • Enforcing policies that prohibit evaluating untrusted input and require allowlisted type resolution.
  • Monitoring API and WebSocket activity for unexpected access to affected commands.

Automated code review tools can help identify risky evaluation patterns.

Sources

SourceLink
github.comgithub.com/music-assistant/server/commit/c7408625bdaa08bdd4419255fccb1c7f82828d26
github.comgithub.com/music-assistant/server/commit/d79ffd1e393eacc9d9402eaa26ff50d9618b247b
github.comgithub.com/music-assistant/server/pull/3271
github.comgithub.com/music-assistant/server/releases/tag/2.8.0
github.comgithub.com/music-assistant/server/security/advisories/GHSA-cjp7-8r57-vc8f

Frequently asked

questions

The affected commands are reachable through the WebSocket and REST JSON-RPC endpoints, so an authenticated user may trigger the issue over those interfaces.

Authentication is required, but the description indicates that no specific role is needed.

Avoid evaluating caller-controlled input as code. Resolve permitted types through an explicit allowlist or fixed mapping, with validation before processing.

Prohibit dynamic evaluation of untrusted input, review request-to-parser data flows, and use least-privilege access controls for the application and its endpoints.

Find out what's already
exploitable in your codebase.