Lollms vulnerable to Cross-site Scripting
Date: 2024-10
Affected: pip/lollms
Attack vector: xss
Category: vulnerability-disclosure
Severity: Medium
CVE: CVE-2024-6581
CWE: CWE-79
CVSS: 6.5 (CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L)

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.


Mitigations:

Architectural layers (MAESTRO):