CVE-2025-52902: File Browser has Stored Cross-Site Scripting vulnerability

Published Jun 26, 2025
·
Updated

Summary ##

The Markdown preview function of File Browser v2.32.0 is vulnerable to Stored Cross-Site-Scripting (XSS). Any JavaScript code that is part of a Markdown file uploaded by a user will be executed by the browser

Impact ##

A user can upload a malicious Markdown file to the application which can contain arbitrary HTML code. If another user within the same scope clicks on that file, a rendered preview is opened. JavaScript code that has been included will be executed.

Malicious actions that are possible include: Obtaining a user's session token Elevating the attacker's privileges, if the victim is an administrator (e.g., gaining command execution rights)

Vulnerability Description ##

Most Markdown parsers accept arbitrary HTML in a document and try rendering it accordingly. For instance, if one creates a file called xss.md with the following content:

markdown Hallo

<b>foo</b>

<img src="xx" onerror=alert(9)> <i>bar</i>

Bold and italic text will be rendered. Also, the renderer used in File Browser will try to display the image and execute the code in the onerror event handler.

Proof of Concept ##

The screenshot shows that the code from the file mentioned above has actually been executed in the victim's browser:

!JavaScript code being executed in the Markdown Preview

Recommended Countermeasures ##

The most thorough fix would be to reconfigure the application's Markdown parser to ignore all HTML elements and only render rich text which is part of the Markdown specification. If HTML rendering is considered to be a required feature, an HTML sanitizer like DOMPurify should be used, preferably in conjunction with a Content Security Policy (CSP).

Timeline ##

2025-03-25 Identified the vulnerability in version 2.32.0 2025-04-11 Contacted the project 2025-04-18 Vulnerability disclosed to the project 2025-06-25 Uploaded advisories to the project's GitHub repository 2025-06-26 CVE ID assigned by GitHub 2025-06-26 Fix released with version 2.33.7

References ##

DOMPurify

Credits ##

Mathias Tausig (SBA Research)

Other sources

File Browser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit files. The Markdown preview function of File Browser prior to v2.33.7 is vulnerable to Stored Cross-Site-Scripting (XSS). Any JavaScript code that is part of a Markdown file uploaded by a user will be executed by the browser. Version 2.33.7 contains a fix for the issue.

MITRE

Affected Software

4 affected componentsFixes available
File Browser File Browser<2.33.7
go/github.com/filebrowser/filebrowser<=1.11.0
go/github.com/filebrowser/filebrowser/v2<2.33.7
2.33.7
Filebrowser Filebrowser<2.33.7

Event History

Jun 26, 2025
CVE Published
via MITRE·02:37 PM
Data Sourced
via MITRE·02:37 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·03:15 PM
RemedyAffected Software
Jun 27, 2025
Advisory Published
via GitHub·03:01 PM
Data Sourced
via GitHub·03:01 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-52902?

CVE-2025-52902 is classified as a moderate severity vulnerability due to the risk of stored XSS attacks.

2

How do I fix CVE-2025-52902?

To fix CVE-2025-52902, update File Browser to version 2.33.7 or later.

3

What type of vulnerability is CVE-2025-52902?

CVE-2025-52902 is a Stored Cross-Site Scripting (XSS) vulnerability.

4

What impact does CVE-2025-52902 have on users?

CVE-2025-52902 allows an attacker to execute arbitrary JavaScript code in the context of a user's session.

5

Which versions of File Browser are affected by CVE-2025-52902?

File Browser versions prior to 2.33.7 are vulnerable to CVE-2025-52902.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203