CVE-2024-6986

5.4 MEDIUM

📋 TL;DR

A stored Cross-site Scripting (XSS) vulnerability in parisneo/lollms-webui allows attackers to inject malicious JavaScript into the System Template configuration. When administrators view the Settings page, the injected code executes in their browser context. This affects all users running vulnerable versions of the lollms-webui software.

💻 Affected Systems

Products:
  • parisneo/lollms-webui
Versions: Version 9.8 specifically
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects instances where the Settings page is accessible and the System Template input field can be modified.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attacker gains administrative privileges by stealing session cookies or performing actions as the administrator, potentially leading to complete system compromise.

🟠

Likely Case

Attacker steals administrator session cookies, leading to unauthorized access to the web interface and potential data exfiltration.

🟢

If Mitigated

Limited impact if only trusted users can access the Settings page and input validation is performed elsewhere.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires access to modify the System Template field, typically requiring some level of authentication or access to the configuration interface.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version after 9.8

Vendor Advisory: https://huntr.com/bounties/83e9bde1-40b2-49e9-be1c-bc1498eb8ebd

Restart Required: Yes

Instructions:

1. Update to the latest version of lollms-webui. 2. Restart the webui service. 3. Verify the fix by checking that v-html directive is no longer used with untrusted input.

🔧 Temporary Workarounds

Input Sanitization

all

Implement server-side input validation and sanitization for the System Template field

Modify the backend code to sanitize HTML input before storing in full_template variable

Restrict Settings Access

all

Limit access to the Settings page to trusted administrators only

Configure web server or application firewall to restrict /settings path

🧯 If You Can't Patch

  • Disable or restrict access to the Settings page entirely
  • Implement Content Security Policy (CSP) headers to prevent script execution

🔍 How to Verify

Check if Vulnerable:

Check if running version 9.8 of lollms-webui and inspect if the Settings page uses v-html directive with full_template variable

Check Version:

Check the webui interface or configuration files for version information

Verify Fix Applied:

After updating, test if JavaScript payloads in System Template field are properly sanitized and do not execute

📡 Detection & Monitoring

Log Indicators:

  • Unusual modifications to System Template configuration
  • JavaScript payloads in configuration logs

Network Indicators:

  • Requests to Settings page with suspicious payloads in parameters

SIEM Query:

source="webui_logs" AND ("System Template" OR "full_template") AND ("<script>" OR "javascript:")

🔗 References

📤 Share & Export