CVE-2024-2624
📋 TL;DR
This vulnerability allows attackers to perform path traversal and arbitrary file uploads in the lollms-webui application by manipulating the 'path' parameter. Attackers can read sensitive personal data, upload malicious files, and overwrite configuration files, potentially leading to remote code execution. All users running vulnerable versions of lollms-webui are affected.
💻 Affected Systems
- parisneo/lollms-webui
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Remote code execution through configuration file overwrite leading to complete system compromise.
Likely Case
Sensitive information disclosure and unauthorized file uploads allowing data theft and persistence.
If Mitigated
Limited impact with proper input validation and file system restrictions in place.
🎯 Exploit Status
The vulnerability is in a GET endpoint and requires minimal technical skill to exploit.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 9.4
Vendor Advisory: https://github.com/parisneo/lollms-webui/commit/aeba79f3ea934331b8ecd625a58bae6e4f7e7d3f
Restart Required: Yes
Instructions:
1. Update lollms-webui to version 9.4 or later. 2. Restart the application service. 3. Verify the fix by checking the version.
🔧 Temporary Workarounds
Restrict access to vulnerable endpoint
allBlock or restrict access to the /switch_personal_path endpoint using web server configuration or firewall rules.
# Example for nginx: location ~ ^/switch_personal_path { deny all; }
# Example for Apache: <Location "/switch_personal_path"> Require all denied </Location>
Implement input validation at proxy level
allAdd input validation for the 'path' parameter at the web application firewall or reverse proxy level.
# Example WAF rule to block path traversal patterns
# ModSecurity: SecRule ARGS:path "\.\." "id:1001,phase:2,deny"
🧯 If You Can't Patch
- Isolate the application in a restricted network segment with no internet access.
- Implement strict file system permissions to limit what directories the application can access.
🔍 How to Verify
Check if Vulnerable:
Check if the application version is below 9.4 by examining the version in the web interface or configuration files.
Check Version:
Check the application's web interface or configuration files for version information.
Verify Fix Applied:
Confirm the application is running version 9.4 or later and test that the /switch_personal_path endpoint properly validates the 'path' parameter.
📡 Detection & Monitoring
Log Indicators:
- Unusual access patterns to /switch_personal_path endpoint
- Requests with 'path' parameter containing '..' or absolute paths
- File uploads to unexpected directories
Network Indicators:
- HTTP GET requests to /switch_personal_path with suspicious path parameters
SIEM Query:
source="web_server" AND (url="/switch_personal_path" AND (path="*..*" OR path="/*"))
🔗 References
- https://github.com/parisneo/lollms-webui/commit/aeba79f3ea934331b8ecd625a58bae6e4f7e7d3f
- https://huntr.com/bounties/39e17897-0e92-4473-91c7-f728322191aa
- https://github.com/parisneo/lollms-webui/commit/aeba79f3ea934331b8ecd625a58bae6e4f7e7d3f
- https://huntr.com/bounties/39e17897-0e92-4473-91c7-f728322191aa