Summary
Movary, a web application for tracking and exploring movie watch history, contains a reflected cross-site scripting (XSS) vulnerability in the categoryDeleted query parameter in versions prior to 0.70.0.
When crafted input is reflected back into the page without proper validation or encoding, an attacker can execute arbitrary JavaScript in a victim's browser, potentially leading to session hijacking, account misuse, or unauthorized actions within the application.
Affected context
The vulnerability occurs in Movary's web interface where the ?categoryDeleted= query parameter is processed and rendered in the browser.
It is relevant when:
- User-controlled data from the
categoryDeletedparameter is incorporated into HTML responses, and - The application does not apply sufficient input validation or output encoding before rendering this value.
Typical scenarios include links shared or embedded that contain the crafted parameter, especially when users are authenticated to Movary while visiting the malicious URL.
Exploit preconditions
- Attack surface: HTTP(S) requests to Movary endpoints that consume the
?categoryDeleted=query parameter. - Required access: Ability to trick a user into visiting a crafted URL (e.g., via link sharing, phishing, or embedding in another page). Direct authentication is not required for the attacker, but impact increases when the victim is logged in.
- Trigger point: Loading a Movary page where the
categoryDeletedparameter value is reflected into the response without proper sanitization or encoding. - Why exploitation is possible: Insufficient input validation (CWE-20) and lack of context-appropriate output encoding (CWE-79) allow attacker-supplied content to be interpreted as executable JavaScript in the victim's browser.
Why this happens
The root cause is improper handling of user-supplied input from the categoryDeleted query parameter before it is incorporated into HTML content.
Instead of treating this parameter purely as data and encoding it for the target context (HTML, attribute, or script), the application reflects it directly or with inadequate filtering.
This aligns with CWE-79: Improper Neutralization of Input During Web Page Generation (Cross-site Scripting), with CWE-20: Improper Input Validation contributing as the underlying lack of robust validation rules.
The abstract insecure pattern is: "Untrusted query parameter → directly embedded into page output → browser interprets part of it as code."
Potential impact
- Execution of arbitrary JavaScript in the victim's browser within the Movary origin.
- Theft or misuse of session information (where applicable), potentially leading to account takeover.
- Unauthorized actions performed on behalf of the logged-in user (e.g., modifying watch history or ratings).
- Injection of phishing content or UI overlays to trick users into revealing additional credentials or personal data.
- Use of the affected Movary instance as a pivot point for broader attacks against users (e.g., browser-based exploitation chains).
General mitigation guidance
Mitigation typically focuses on systematic handling of untrusted data and enforcing strict separation between data and code in the UI:
- Apply context-aware output encoding whenever incorporating user-supplied data into HTML, attributes, URLs, or JavaScript contexts.
- Perform input validation on query parameters like
categoryDeletedto ensure they match expected patterns (e.g., restricted to known values, IDs, or simple strings). - Favor allowlist-based validation rules over blocklists, especially for values that are meant to be constrained to specific categories or identifiers.
- Centralize templating and output routines using frameworks or libraries that automatically encode variables by default.
- Avoid directly concatenating user input into HTML or JavaScript; instead, pass data through structured APIs (e.g., DOM APIs, templating engines, or JSON responses consumed safely on the client).
How teams detect issues like this
Effective detection strategies combine code-level analysis with behavioral testing:
- Static analysis: Configure SAST rules to flag patterns where request parameters (such as query strings) flow directly into HTML output without encoding. Look for direct template interpolation or string concatenation involving
categoryDeletedor similar fields. - Code review: During manual review, pay attention to:
- Controllers or route handlers reading query parameters and passing them to views.
- Templating logic that renders user input in headings, messages, or notifications without explicit encoding.
- Dynamic testing: Use automated or manual XSS test payloads in the
categoryDeletedparameter and observe whether they are reflected unencoded in the resulting page. - Security policies and linters: Enforce coding standards that require centralized encoding helpers and prohibit inline HTML/JS construction from raw user input. Automated review tools can be integrated into CI pipelines to enforce these policies consistently.

