Lollms vulnerable to Cross-site Scripting
The discussion image upload function in Lollms v9.9 allows SVG files, and its sanitize_svg function only removes script elements and on* event attributes, leaving other XSS vectors. An attacker could upload a crafted SVG that executes script when an authorised user accesses a malicious URL, potentially leading to remote code execution.
parisneo/lollms
Originally disclosed on huntr
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.
From the GitHub Advisory Database (GHSA-cm59-8rmv-f2cj, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the SVG sanitiser uses a blocklist that only removes script elements and on* attributes, missing other XSS vectors in SVG.
Impact
An attacker could execute script in an authorised user's browser, potentially leading to remote code execution.
What the attacker needed
Authorised user; attacker uploads SVG; victim accesses malicious URL
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
This is a cross-site scripting (XSS) bug: a website lets people upload pictures, but it also accepts SVG files, which are a kind of image that can contain code. The site tries to clean the SVG by removing obvious dangerous parts, but misses other ways to hide code. When another user opens the uploaded file, their browser runs the hidden code, which could let an attacker take over their session or do more damage.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.