Remote Code Execution due to Stored XSS in parisneo/lollms
Description
A vulnerability in the discussion image upload function of the Lollms application, version v9.9, allows for the uploading of SVG files. Due to incomplete filtering in the sanitize_svg function, this can lead to cross-site scripting (XSS) vulnerabilities, which in turn pose a risk of remote code execution. The sanitize_svg function only removes script elements and 'on*' event attributes, but does not account for other potential vectors for XSS within SVG files. This vulnerability can be exploited when authorized users access a malicious URL containing the crafted SVG file.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Lollms v9.9's SVG upload function fails to fully sanitize SVG files, enabling XSS that can lead to remote code execution when authorized users view crafted URLs.
Vulnerability
Details
The Lollms application, version v9.9, contains a cross-site scripting (XSS) vulnerability in its discussion image upload feature. The function responsible for sanitizing uploaded SVG files, sanitize_svg, only removes ` elements and on* event attributes (e.g., onload). However, it does not account for other XSS vectors within SVG files, such as elements, inclusions, or JavaScript URLs in href` attributes. This incomplete filtering allows an attacker to inject arbitrary JavaScript or HTML into an SVG file that bypasses the sanitization [1][4].
Exploitation
Conditions
To exploit this vulnerability, an attacker must be an authorized user of the Lollms application who can upload an SVG file as part of a discussion. The crafted SVG file is then delivered to other authorized users via a malicious URL. No additional authentication bypass is required beyond normal user privileges. The attack can succeed when a target user accesses the provided malicious URL, which loads the unsanitized SVG content in their browser [1].
Impact
Successful exploitation results in cross-site scripting (XSS) execution within the context of the authenticated user's session. This can lead to data theft, session hijacking, or, as stated in the description, remote code execution (RCE) if the XSS is chained with other vulnerabilities or used to execute API calls and file operations [1]. The application's multi-user backend (FastAPI) and rich feature set (including file uploads, RAG, and admin panels) increase the potential blast radius [2].
Mitigation
At the time of publication (2024-10-29), no patch has been officially released. Users of Lollms version 9.9 should disable SVG uploads or apply strict content security policies as a workaround. The vendor's project page and advisories indicate ongoing maintenance, but no fix has been confirmed for this specific issue [2][3].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
lollmsPyPI | <= 9.5.1 | — |
Affected products
2- parisneo/parisneo/lollmsv5Range: unspecified
Patches
1328b960a0de2Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
5- github.com/advisories/GHSA-cm59-8rmv-f2cjghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-6581ghsaADVISORY
- github.com/parisneo/lollms/commit/328b960a0de2097e13654ac752253e9541521dddghsaWEB
- github.com/pypa/advisory-database/tree/main/vulns/lollms/PYSEC-2024-116.yamlghsaWEB
- huntr.com/bounties/ad68ecd6-44e2-449b-8e7e-f2b71b1b43c7ghsaWEB
News mentions
0No linked articles in our index yet.