CVE-2026-42052 beets is Vulnerable to XSS
An attacker can inject malicious scripts into the web UI via untrusted metadata fields, potentially executing code in the victim's browser.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-42052?
CVE-2026-42052 is a medium-severity cross-site scripting vulnerability in beetbox beets, published on 4 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
Beets is the media library management system. Prior to version 2.10.0, 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. This issue has been patched in version 2.10.0.
Weakness: CWE-79
Which versions are affected by CVE-2026-42052?
3 open source packages ship an affected version, including beets.
| Package | Affected | Fixed in |
|---|---|---|
beets PyPI | All versions | 2.10.0 |
beets PyPI | All versions | 2.10.0 |
beets PyPI | All versions | 2.10.0 |
Linux distribution packages (2)
beets openSUSE:Leap 16.0 | All versions | 2.2.0-bp160.2.1 |
beets openSUSE:Tumbleweed | All versions | 2.11.0-1.1 |
How do I fix CVE-2026-42052?
Upgrade beets to 2.10.0 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-42052 being exploited?
There is no known exploitation of CVE-2026-42052 in the wild and no public exploit code.
Sources
Also known as DEBIAN-CVE-2026-42052, GHSA-3gxm-wfjx-m847, PYSEC-2026-2397, UBUNTU-CVE-2026-42052, USN-8747-1, openSUSE-SU-2026:10865-1 and 1 more.