CVE-2025-52902: Github.com/filebrowser/filebrowser/v2 Cross-Site Scripting Vulnerability
HIGHCVE-2025-52902 is a HIGH (CVSS 7.6) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/filebrowser/filebrowser/v2 libraries in the Go ecosystem. The issue involves filebrowser allows stored cross-site scripting through the markdown preview function. Remediation is available by upgrading affected packages to version 2.33.7.
CVE-2025-52902 at a Glance
Security Impact
CVSS: 7.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N).
How to Fix CVE-2025-52902
To remediate this vulnerability, upgrade all affected Github.com/filebrowser/filebrowser/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/filebrowser/filebrowser/v2 to 2.33.7
Upgrade github.com/filebrowser/filebrowser to Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/filebrowser/filebrowser/v2
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-52902, inspect your project dependencies for Github.com/filebrowser/filebrowser/v2:
inspect dependencies for github.com/filebrowser/filebrowser/v2
Analyze the terminal output to locate any version of Github.com/filebrowser/filebrowser/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.33.7), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where 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. In Github.com/filebrowser/filebrowser/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-52902 Affected Github.com/filebrowser/filebrowser/v2 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/filebrowser/filebrowser/v2
|
Go |
< 2.33.7
|
2.33.7
|
|
github.com/filebrowser/filebrowser
|
Go |
≤ 1.11.0
|
|
References
Frequently Asked Questions
What is CVE-2025-52902?
Which Github.com/filebrowser/filebrowser/v2 versions are affected?
What version fixes CVE-2025-52902?
Is github.com/filebrowser/filebrowser/v2 affected?
Is github.com/filebrowser/filebrowser affected?
What is the CVSS score of CVE-2025-52902?
What CWE is associated with CVE-2025-52902?
How can I check Go dependencies for CVE-2025-52902?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4wx8-5gm2-2j97",
"modified" : "2025-08-04T20:33:13Z",
"published" : "2025-06-27T15:01:15Z",
"aliases" : [ "CVE-2025-52902" ],
"summary" : "filebrowser allows Stored Cross-Site Scripting through the Markdown preview function",
"details" : "## Summary ##\n\nThe 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\n\n## Impact ##\n\nA 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.\n\n Malicious actions that are possible include:\n \n * Obtaining a user's session token\n * Elevating the attacker's privileges, if the victim is an administrator (e.g., gaining command execution rights)\n\n## Vulnerability Description ##\n\nMost 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:\n\n```markdown\n# Hallo\n\n<b>foo</b>\n\n<img src=\"xx\" onerror=alert(9)>\n<i>bar</i>\n```\n\nBold 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.\n\n## Proof of Concept ##\n\nThe screenshot shows that the code from the file mentioned above has actually been executed in the victim's browser:\n\n\n\n## Recommended Countermeasures ##\n\nThe 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).\n\n## Timeline ##\n\n* `2025-03-25` Identified the vulnerability in version 2.32.0\n* `2025-04-11` Contacted the project\n* `2025-04-18` Vulnerability disclosed to the project\n* `2025-06-25` Uploaded advisories to the project's GitHub repository\n* `2025-06-26` CVE ID assigned by GitHub\n* `2025-06-26` Fix released with version 2.33.7\n\n## References ##\n\n* [DOMPurify](https://github.com/cure53/DOMPurify)\n* [Original Advisory](https://github.com/sbaresearch/advisories/tree/public/2025/SBA-ADV-20250325-04_Filebrowser_Stored_XSS)\n\n## Credits ##\n\n* Mathias Tausig ([SBA Research](https://www.sba-research.org/))",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/filebrowser/filebrowser/v2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.33.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/filebrowser/filebrowser"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.11.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/filebrowser/filebrowser/security/advisories/GHSA-4wx8-5gm2-2j97"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-52902"
}, {
"type" : "WEB",
"url" : "https://github.com/filebrowser/filebrowser/commit/f19943a42e8e092e811dffbe9f4623dac36f1f0d"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/filebrowser/filebrowser"
}, {
"type" : "WEB",
"url" : "https://github.com/sbaresearch/advisories/tree/public/2025/SBA-ADV-20250325-04_Filebrowser_Stored_XSS"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2025-3784"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-06-27T15:01:15Z",
"nvd_published_at" : "2025-06-26T15:15:23Z"
}
}