CVE-2026-73971
Unauthenticated RCE via eval in parse_arguments allowing arbitrary code execution.
- CVSS 8.0
- CWE-95
- Input Validation and Sanitization
- Remote
Music Assistant is an open-source media library manager that integrates streaming services with connected speakers. Prior to 2.8.0, parse_arguments() passes the caller-controlled return_type parameter for config/core/get_value, config/providers/get_value, and config/players/get_value to parse_value() and Python eval() when resolving type parameters in music_assistant/helpers/api.py. Any authenticated user, regardless of role, can reach these commands through the WebSocket /ws endpoint or the REST JSON-RPC /api endpoint, causing arbitrary Python code to run with the Music Assistant server process privileges before command-handler validation, even if the request later fails. A default installation requires no special configuration, and compromise can expose secrets and configuration, alter library data, and control the application container. This issue is fixed in version 2.8.0.
- CWE
- CWE-95
- CVSS base score
- 8.0
- Published
- 2026-11-18
- OWASP
- A03 Injection
- Orthogonal defect classification
- Interface
- Code defect classification
- Incorrect Interface
- Category
- Input Validation and Sanitization
- Subcategory
- Insecure Parsing or Deserialization
- Accessibility scope
- Remote
- Impact
- Arbitrary Code Execution
- Affected component
- Music Assistant
- Fixed by upgrading
- Yes
Solution
Upgrade Music Assistant to version 2.8.0 or later.
Vulnerable code sample
import ast
from typing import Any, Callable, Dict
def parse_value(value: str, return_type: str) -> Any:
# VULNERABLE: uses eval on attacker-controlled return_type
return eval(f"{value}", {"__builtins__": {}}, {"type": return_type})
def parse_arguments(args: Dict[str, str]) -> Dict[str, Any]:
result = {}
for key, val in args.items():
# callers may supply a return_type like "int" or malicious code
return_type = args.get("return_type", "str")
result[key] = parse_value(val, return_type)
return resultPatched code sample
import ast
from typing import Any, Callable, Dict
def parse_value(value: str, return_type: str) -> Any:
# FIX: replace eval with safe literal parsing and whitelist types
whitelist: Dict[str, Callable[[str], Any]] = {
"int": int,
"float": float,
"str": str,
"bool": lambda v: v.lower() in ("true", "1"),
}
converter = whitelist.get(return_type, str)
try:
# Try literal conversion first (e.g., JSON numbers, booleans)
return ast.literal_eval(value)
except (ValueError, SyntaxError):
return converter(value)
def parse_arguments(args: Dict[str, str]) -> Dict[str, Any]:
result = {}
for key, val in args.items():
return_type = args.get("return_type", "str")
result[key] = parse_value(val, return_type)
return resultPublished fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- fix: Skip type[X] parameters in API argument parsing to prevent RCE (music-assistant/server)
music_assistant/helpers/api.py - Fix helper for safe type evaluation (#3271) (music-assistant/server)
music_assistant/helpers/api.py
Cite this entry
@misc{vaitp:cve202673971,
title = {{Unauthenticated RCE via eval in parse_arguments allowing arbitrary code execution.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-73971},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-73971/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
