CVE-2024-1522

8.8 HIGH

📋 TL;DR

A Cross-Site Request Forgery (CSRF) vulnerability in the parisneo/lollms-webui project allows remote attackers to execute arbitrary OS commands on a victim's system. Attackers can craft malicious webpages that, when visited by victims with a local lollms-webui instance running, trigger code execution without requiring direct network access to the vulnerable application. This affects all users running vulnerable versions of lollms-webui with the web interface accessible.

💻 Affected Systems

Products:
  • parisneo/lollms-webui
Versions: All versions before commit 0b51063119cfb5e391925d232a4af1de9dc32e2b
Operating Systems: All operating systems where lollms-webui runs
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default configuration when the web interface is running and accessible.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with remote code execution leading to data theft, ransomware deployment, or persistent backdoor installation.

🟠

Likely Case

Attacker gains shell access on victim's machine, potentially stealing sensitive data or using the system as a pivot point.

🟢

If Mitigated

Limited impact with proper CSRF protections and network segmentation in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires victim to visit a malicious webpage while having lollms-webui running locally.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Commit 0b51063119cfb5e391925d232a4af1de9dc32e2b and later

Vendor Advisory: https://github.com/parisneo/lollms-webui/commit/0b51063119cfb5e391925d232a4af1de9dc32e2b

Restart Required: Yes

Instructions:

1. Update to the latest version from GitHub. 2. Pull the latest changes: git pull origin main. 3. Restart the lollms-webui service.

🔧 Temporary Workarounds

Disable web interface

all

Stop using the vulnerable web interface component

Stop the lollms-webui service

Network isolation

all

Restrict access to lollms-webui to localhost only

Configure firewall to block external access to lollms-webui port

🧯 If You Can't Patch

  • Implement strict CSRF tokens on all API endpoints
  • Run lollms-webui in a sandboxed/containerized environment with minimal privileges

🔍 How to Verify

Check if Vulnerable:

Check if your version is before commit 0b51063119cfb5e391925d232a4af1de9dc32e2b

Check Version:

git log --oneline -1

Verify Fix Applied:

Verify the /execute_code endpoint now requires proper CSRF token validation

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to /execute_code endpoint
  • OS command execution from web interface

Network Indicators:

  • External requests to lollms-webui API endpoints
  • CSRF attack patterns

SIEM Query:

source="lollms-webui" AND (uri_path="/execute_code" OR method="POST")

🔗 References

📤 Share & Export