/

CVE-2026-23840

Severity:

CRITICAL RISK

(9.3)

Cross-Site Scripting (XSS) in Movary

CVE-2026-23840

Analyzed

Vulnerability type

Category:

Cross-Site Scripting (XSS)

CWE:

CWE-20, CWE-79

Impact:

Client-Side Code Execution / Account Compromise

Severity:

CRITICAL RISK

(9.3)

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

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 categoryDeleted parameter 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 categoryDeleted parameter 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 categoryDeleted to 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 categoryDeleted or 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 categoryDeleted parameter 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.

Sources

SourceLink
github.comgithub.com/leepeuker/movary/blob/main/public/js/settings-account-location.js#L204
github.comgithub.com/leepeuker/movary/releases/tag/0.70.0
github.comgithub.com/leepeuker/movary/security/advisories/GHSA-pj3m-gmq8-2r57

Frequently asked

questions

Yes. An attacker can exploit the issue remotely by crafting a URL containing a malicious categoryDeleted parameter and convincing a victim to open it in their browser.

The attacker does not need their own account; they primarily need the ability to deliver a malicious link. However, the most damaging effects (such as modifying watch history or accessing sensitive user-specific data) depend on the victim being authenticated to Movary when they visit the link.

The safest pattern is to treat all user-controlled data as untrusted, apply strict input validation to parameters like categoryDeleted, and enforce context-aware output encoding everywhere they are rendered. Using templating systems or view helpers that auto-escape output by default significantly reduces the risk.

Adopt a secure coding standard for web output: never concatenate untrusted input into HTML or JavaScript, always use encoding functions appropriate to the output context, validate parameters against strict allowlists, and integrate automated security checks (static analysis and automated tests) into the development and review process.

Find out what's already
exploitable in your codebase.