CVE-2024-6581: Lollms Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-cm59-8rmv-f2cj
CVSS 6.5
CWE-79
Published
Advisory Summary

CVE-2024-6581 is a MODERATE (CVSS 6.5) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Lollms libraries in the PyPI ecosystem. The issue involves lollms vulnerable to cross-site scripting. Remediation is available in the latest vendor maintenance releases.

CVE-2024-6581 at a Glance

CVE Identifier CVE-2024-6581
GHSA Identifier GHSA-cm59-8rmv-f2cj
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Lollms
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2024-6581

To remediate this vulnerability, upgrade all affected Lollms dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

lollms fixed: Latest secure release
pip install lollms>=Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show lollms

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-6581, inspect your installed packages using pip:

pip show lollms

Analyze the terminal output to locate any version of Lollms in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The pip show lollms command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Lollms, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2024-6581 Affected Lollms Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
lollms
PyPI
≤ 9.5.1

References

Frequently Asked Questions

What is CVE-2024-6581?
CVE-2024-6581 is a security vulnerability in Lollms involving Lollms vulnerable to Cross-site Scripting under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Lollms versions are affected?
Affected versions include releases prior to current release patches across affected packages: lollms.
What version fixes CVE-2024-6581?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is lollms affected?
Yes, lollms is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2024-6581?
CVE-2024-6581 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L.
What CWE is associated with CVE-2024-6581?
CVE-2024-6581 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check PyPI dependencies for CVE-2024-6581?
Run the dependency tree command: 'pip show lollms'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-cm59-8rmv-f2cj",
  "modified" : "2024-11-04T13:50:54Z",
  "published" : "2024-10-29T15:32:05Z",
  "aliases" : [ "CVE-2024-6581" ],
  "summary" : "Lollms vulnerable to Cross-site Scripting",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "lollms"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "9.5.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-6581"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/parisneo/lollms/commit/328b960a0de2097e13654ac752253e9541521ddd"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/parisneo/lollms"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/lollms/PYSEC-2024-116.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/ad68ecd6-44e2-449b-8e7e-f2b71b1b43c7"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-11-01T22:03:33Z",
    "nvd_published_at" : "2024-10-29T13:15:07Z"
  }
}