beets
Affected
- introduced
0, fixed2.10.0(ecosystem)
Fixed versions
2.10.0
Fix
- Fixed version
2.10.0pip install --upgrade beets==2.10.0
Advisory
Also known as: CVE-2026-42052, GHSA-3gxm-wfjx-m847
beets has a Cross-site Scripting vulnerability
During code logic analyis, an area that may lead to unintended behavior under specific conditions was discovered.
Overview
80cd21554124da07d17a4f962c7d770a4f70d0f2beetsplug/web/templates/index.html:42title, lyrics, or comments are rendered with raw template interpolation and inserted into DOM via .html(...).Root Cause
The bundled web UI uses Underscore template interpolation mode <%= ... %> for untrusted metadata fields. In this runtime, <%= ... %> is raw insertion and HTML escaping is only performed by <%- ... %>. Rendered output is then inserted with .html(...), allowing attacker-controlled markup to become active DOM.
Source-to-Sink Chain
title, lyrics, comments) can contain attacker HTML payload.beetsplug/web/templates/index.html:42-46,87-91 render metadata with <%= ... %>.<%= ... %> as raw interpolation (beetsplug/web/static/underscore.js:890-907).$(this.el).html(this.template(this.model.toJSON())); in beetsplug/web/static/beets.js:182,208,220.Exploitation Preconditions
Risk
Stored payload executes in the web UI context and can perform actions available to that origin.
Impact
Attacker can run arbitrary JavaScript in the victim browser, exfiltrate viewable data, and perform UI-driven actions as the victim session.
Remediation
<%= ... %> with escaped output <%- ... %> for untrusted fields..html(...) for untrusted template output; use text-safe rendering.Not rated by the source.
0, fixed 2.10.0 (ecosystem)2.10.0
2.10.0pip install --upgrade beets==2.10.0Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: PyPA Advisory Database · CC BY 4.0