Skip to content

Stored Cross-Site Scripting (XSS) and possible Privilege Escalation via Malicious SVG Upload

High
manuel-rw published GHSA-wj62-c5gr-2x53 Nov 19, 2025

Package

ghcr.io/homarr-labs/homarr (Docker image)

Affected versions

<=1.43.2

Patched versions

>= 1.43.3

Description

Summary

A stored XSS vulnerability exists, allowing the execution of arbitrary JavaScript in a user's browser, with minimal or no user interaction required, due to the rendering of a malicious uploaded SVG file. This could be abused to add an attacker's account to the "credentials-admin" group, giving them full administrative access, if a user logged in as an administrator was to view the page which renders or redirects to the SVG.

Details

It is possible to upload an SVG file containing arbitrary JavaScript via the media upload feature, then use multiple techniques to redirect the user to or embed the malicious SVG within the webpage, executing the JavaScript upon page load where the SVG is rendered.

Uploaded files should undergo sanitisation to remove specific attributes, such as <script> tags and arbitrary JavaScript. A proven sanitisation library should be used to perform this operation.

Fixes

Patched Versions: >=1.43.3

  • SVG files uploaded by a user and accessed via the /api/user-medias/ endpoint are sanitised using the "isomorphic-dompurify" package, completely stripping arbitrary inline event handlers (such as onload) and JavaScript before being returned to the user's browser.
  • Default sandbox attributes have been added to the iFrame item to prevent potentially malicious or unwanted content from being loaded within the iFrame.

Impact

This vulnerability impacts any authenticated user with access to a board, or any unauthenticated user if the board is made public. The "attacker" would need to have permissions to upload media and edit a board, which could be achieved through having access to an account that is part of the credentials-admin group, or a custom made group that gives those specific permissions to its members.
This vulnerability can be exploited for phishing, malware distribution, or full administrator privilege escalation.

Severity

High

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
Network
Attack complexity
Low
Privileges required
High
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
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:N/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N

CVE ID

CVE-2025-64759

Weaknesses

Improper Input Validation

The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. Learn more on MITRE.

Unrestricted Upload of File with Dangerous Type

The product allows the upload or transfer of dangerous file types that are automatically processed within its environment. Learn more on MITRE.

Credits