CVE-2024-6581CWE-79

Remote Code Execution due to Stored XSS in parisneo/lollms

Medium · published October 29, 2024

CVSS v3.0
6.5
EPSS
1%
Percentile
50.7
In the wild
Unconfirmed
What it is

⚠️ A sneaky flaw in Lollms lets uploaded SVG files smuggle in malicious scripts — like an uninvited guest at a party! Think of the sanitize_svg function as a bouncer who only checks for obvious troublemakers, but overlooks some crafty individuals slipping in through the back door. This means that while script elements are nixed, other sneaky vectors can still cause chaos! An attacker could upload a malicious SVG file that executes unwanted scripts when an authorized user opens the image. This may lead to unauthorized data access, session hijacking, or even remote code execution — a scenario no one wants to face!

Put simply

Think of the sanitize_svg function as a bouncer who only checks for obvious troublemakers, but overlooks some crafty individuals slipping in through the back door. This means that while script elements are nixed, other sneaky vectors can still cause chaos! This vulnerability arises from incomplete filtering within the sanitize_svg function, which only removes script tags and 'on*' event attributes from SVG files, leaving other potential XSS vectors unguarded.

What to do

An attacker could upload a malicious SVG file that executes unwanted scripts when an authorized user opens the image. This may lead to unauthorized data access, session hijacking, or even remote code execution — a scenario no one wants to face! To remedy this, immediately update Lollms to the latest version that addresses this issue. Additionally, ensure proper sanitization practices are enforced for all file uploads and consider implementing a Content Security Policy for added protection. You've got this! With these steps, you can tighten security and keep your application safe from these sneaky intruders! 🛡️

The record
Technical detail
CVSS v3.0
6.5 · MEDIUM
Vector
CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
CVSS v4.0
Not supplied
EPSS
0.00654 · 50.7th percentile
Weakness
CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Published
2024-10-29T12:49Z
EPSS history
Timeline
  • 29 OCT 12:49Z
    Remote Code Execution due to Stored XSS in parisneo/lollms
    cvelistv5