🛡️ CVE-2026-42052 — beets
Description
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
- Verified Version:
80cd21554124da07d17a4f962c7d770a4f70d0f2 - Vulnerability Type: Stored XSS
- Affected Location:
beetsplug/web/templates/index.html:42 - Trigger Scenario: Metadata fields such as
title,lyrics, orcommentsare 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
1. Source (attacker-controlled input)
- Item metadata values (for example
title,lyrics,comments) can contain attacker HTML payload.
2. Data flow
- Templates in
beetsplug/web/templates/index.html:42-46,87-91render metadata with<%= ... %>. - Underscore runtime defines
<%= ... %>as raw interpolation (beetsplug/web/static/underscore.js:890-907).
3. Sink (security-sensitive action)
- Frontend inserts rendered template output into DOM via
$(this.el).html(this.template(this.model.toJSON()));inbeetsplug/web/static/beets.js:182,208,220.
Exploitation Preconditions
1. Victim opens the web UI page that renders attacker-controlled metadata.
2. Metadata includes executable HTML/JS payload.
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
1. Replace raw interpolation <%= ... %> with escaped output <%- ... %> for untrusted fields.
2. Avoid .html(...) for untrusted template output; use text-safe rendering.
3. Sanitize metadata values on ingest and before rendering, including attribute contexts.
How this vulnerability can be exploited
This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. A user must be tricked into taking some action. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity high, availability none.
Weakness class
CVE-2026-42052 is classified as CWE-79: Cross-site Scripting (XSS). User-supplied data is written into a page without escaping, so attacker script runs in the browser of anyone who views it.
Affected software
CVE-2026-42052 is recorded against 2 packages.
- beets (fixed in 2.10.0)
- unknown
Timeline and source
Published on 29 April 2026 and last revised on 13 July 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.
References
github.com (Web)
nvd.nist.gov (Advisory)
github.com (Package)
github.com (Web)
lists.debian.org (Web)
CVE-2026-42052 on other distributions
Each distribution ships its own build and its own fixed version. Pick the one you run:
Details
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| beets | — | 2.10.0 |
| unknown | — | — |
References
Similar Threats
- Unknown openSUSE-SU-2026:21383-1
- Unknown openSUSE-SU-2026:10865-1
- Unknown DEBIAN-CVE-2026-42052
- Unknown UBUNTU-CVE-2026-42052
More CVE 2026 advisories
Browse all of CVE 2026 in the advisory index.
Free Vulnerability Check
Is your site affected by CVE-2026-42052?
BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against CVE-2026-42052 and other known CVE records.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.