Skip to content

Stored XSS through library folder names #170

Closed

Description

@omglazrgunpewpew

Found a stored XSS issue in the library folder rendering.

catalog.js has an esc() helper and the nearby track render paths use it, but folder names get dropped into innerHTML raw:

<span class="f-name">${folder.name}</span>

A folder name like this gets saved and fires again whenever the library renders:

<img src=x onerror=alert(1)>

Matters way more in the desktop app because Tauri is exposed globally and CSP is off, so script in the webview can potentially reach Tauri commands.

Prob fix is escaping folder.name there, or rendering the name with textContent instead.

Activity

  1. thcp commented on Jun 2, 2026

    @thcp
    Collaborator

    Hi @omglazrgunpewpew , thanks for the report, this will be addressed on the next release

  2. added a commit that references this issue on Jun 2, 2026
  3. self-assigned this
    on Jun 2, 2026
  4. thcp commented on Jun 2, 2026

    @thcp
    Collaborator

    Fixed in #176 — folder names are escaped on render now, and there's input validation so you can't even create one containing markup/symbols (plus a 100-char cap). Ships in the next alpha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions