CVE-2024-6581: Lollms: SVG upload XSS enables session hijack and RCE

GHSA-cm59-8rmv-f2cj MEDIUM CISA: TRACK*
Published October 29, 2024
CISO Take

If your team runs self-hosted Lollms for AI-assisted collaboration, any authenticated user can upload a crafted SVG to trigger XSS against other users — including admins — potentially escalating to RCE via Lollms' local filesystem and API access. Patch immediately to the fixed commit (328b960) or disable SVG uploads at the reverse proxy. Low privilege requirement makes this a realistic insider or compromised-account threat vector in AI lab environments.

Risk Assessment

Rated CVSS 6.5 Medium but contextually elevated for AI teams using Lollms as a multi-user platform. The incomplete blocklist-based sanitize_svg — which only strips <script> and on* attributes — misses well-documented SVG XSS vectors: <foreignObject>, <use xlink:href>, <image href>, CSS expression attacks, and data: URI payloads. In self-hosted AI deployments where Lollms has filesystem and model config access, XSS-to-RCE is a realistic escalation chain. EPSS at 1.6% reflects limited public exploitation, but proof-of-concept SVG payloads for these bypass classes are trivially available.

Affected Systems

Package Ecosystem Vulnerable Range Patched
lollms pip <= 9.5.1 No patch
72 Pushed 7d ago 33% patched ~1d to patch Full package profile →

Do you use lollms? You're affected.

Severity & Risk

CVSS 3.1
6.5 / 10
EPSS
1.6%
chance of exploitation in 30 days
Higher than 82% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
CISA SSVC: Public PoC
Composite signal derived from CISA KEV, CISA SSVC, EPSS, trickest/cve, and Nuclei templates.

Attack Surface

AV AC PR UI S C I A
AV Network
AC Low
PR Low
UI Required
S Changed
C Low
I Low
A Low

Recommended Action

1 step
  1. 1) Patch: Pull commit 328b960 or upgrade lollms pip package beyond 9.5.1. 2) Immediate workaround: Block SVG MIME type uploads at nginx/Apache/reverse proxy layer — one-line config change. 3) Harden sanitization: Replace the blocklist-based sanitize_svg with DOMPurify configured with SVG namespace restrictions and a strict allowlist of safe SVG elements. 4) Add CSP: Implement Content-Security-Policy with default-src 'self', disabling inline scripts and restricting resource origins. 5) Detection: Query web server access logs for POST requests uploading .svg files; search stored SVGs for foreignObject, xlink, data:, javascript: strings. 6) Audit: Review all SVG files already stored on the instance for malicious payloads.

CISA SSVC Assessment

Decision Track*
Exploitation poc
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

Classification

Compliance Impact

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.5 - AI system security during design and implementation
NIST AI RMF
MANAGE-2.2 - Mechanisms to respond to and recover from AI risks
OWASP LLM Top 10
LLM02 - Insecure Output Handling LLM07 - Insecure Plugin Design

Frequently Asked Questions

What is CVE-2024-6581?

If your team runs self-hosted Lollms for AI-assisted collaboration, any authenticated user can upload a crafted SVG to trigger XSS against other users — including admins — potentially escalating to RCE via Lollms' local filesystem and API access. Patch immediately to the fixed commit (328b960) or disable SVG uploads at the reverse proxy. Low privilege requirement makes this a realistic insider or compromised-account threat vector in AI lab environments.

Is CVE-2024-6581 actively exploited?

No confirmed active exploitation of CVE-2024-6581 has been reported, but organizations should still patch proactively.

How to fix CVE-2024-6581?

1) Patch: Pull commit 328b960 or upgrade lollms pip package beyond 9.5.1. 2) Immediate workaround: Block SVG MIME type uploads at nginx/Apache/reverse proxy layer — one-line config change. 3) Harden sanitization: Replace the blocklist-based sanitize_svg with DOMPurify configured with SVG namespace restrictions and a strict allowlist of safe SVG elements. 4) Add CSP: Implement Content-Security-Policy with default-src 'self', disabling inline scripts and restricting resource origins. 5) Detection: Query web server access logs for POST requests uploading .svg files; search stored SVGs for foreignObject, xlink, data:, javascript: strings. 6) Audit: Review all SVG files already stored on the instance for malicious payloads.

What systems are affected by CVE-2024-6581?

This vulnerability affects the following AI/ML architecture patterns: Self-hosted LLM frontends and chat interfaces, Multi-user AI collaboration platforms, Agent frameworks with web UI, On-premise AI development workspaces.

What is the CVSS score for CVE-2024-6581?

CVE-2024-6581 has a CVSS v3.1 base score of 6.5 (MEDIUM). The EPSS exploitation probability is 1.65%.

Technical Details

NVD 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.

Exploitation Scenario

An attacker with a free or low-privilege Lollms account uploads a crafted SVG to a discussion thread. The SVG uses a <foreignObject> tag embedding an HTML fragment with a script element — a vector ignored by sanitize_svg's blocklist. The attacker sends a targeted URL to an admin (via email, Slack, or the discussion thread itself). When the admin's browser renders the SVG, the XSS payload fires: it exfiltrates the admin's session cookie and any API keys visible in the page DOM to an attacker-controlled endpoint. With the admin session, the attacker gains full Lollms control, including access to local filesystem bindings, model configurations, and Lollms' code execution extensions — escalating from XSS to RCE.

CVSS Vector

CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L

Timeline

Published
October 29, 2024
Last Modified
November 4, 2024
First Seen
March 24, 2026

Related Vulnerabilities