CVE-2024-3435 Overview
CVE-2024-3435 is a path traversal vulnerability [CWE-29] in the save_settings endpoint of the parisneo/lollms-webui application. The flaw affects all versions prior to 9.5. The apply_settings function fails to sanitize the config parameter, allowing attackers to manipulate application configuration through crafted JSON payloads. This bypass of prior patches can escalate to remote code execution (RCE) on affected hosts. The issue was disclosed through a Huntr bounty submission and patched upstream by the maintainer.
Critical Impact
Attackers with local access to the save_settings endpoint can overwrite configuration paths and achieve arbitrary code execution on the host running lollms-webui.
Affected Products
- parisneo lollms-webui versions prior to 9.5
- Deployments exposing the save_settings endpoint locally
- Installations relying on prior path traversal patches that this bypass defeats
Discovery Timeline
- 2024-05-16 - CVE-2024-3435 published to the National Vulnerability Database (NVD)
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2024-3435
Vulnerability Analysis
The vulnerability resides in the apply_settings function invoked by the save_settings HTTP endpoint. The endpoint accepts a JSON config object and applies its keys to the running application configuration. Sanitization logic filters obvious traversal sequences but fails to normalize nested or encoded path values.
An attacker submits a JSON payload where configuration keys point to attacker-controlled file paths outside the intended settings directory. Because the endpoint trusts the resulting configuration, subsequent load or execution routines operate on attacker-influenced resources. This produces remote code execution when the configuration references executable scripts, model loaders, or extension paths.
The flaw specifically bypasses the earlier remediation for related traversal issues in the same endpoint. That prior patch blocked a narrow set of traversal patterns and did not enforce canonical path resolution against an allow-listed base directory.
Root Cause
The root cause is insufficient input validation of the config parameter. The apply_settings function does not resolve submitted paths to their canonical form, does not confine writes to a configuration directory, and does not reject values that reference locations outside the application root. This aligns with [CWE-29] pathname traversal using ..\ sequences and equivalent constructs.
Attack Vector
Exploitation requires network reachability to the lollms-webui service and the ability to send a POST request to save_settings. The attacker submits a JSON payload whose configuration entries specify a file path outside the intended directory. When the application reloads the modified configuration, the attacker-controlled path is dereferenced. Because lollms-webui loads Python-based components from configured paths, this dereference converts a configuration write into code execution in the process context of the web UI.
Refer to the Huntr Bounty Submission for the reporter's proof-of-concept details.
Detection Methods for CVE-2024-3435
Indicators of Compromise
- POST requests to /save_settings containing traversal sequences such as ..\, ..%2f, or absolute paths in JSON values
- Unexpected modifications to lollms-webui configuration files or entries referencing paths outside the installation directory
- New or modified Python files, model definitions, or extension scripts in directories writable by the lollms-webui process
- Child processes spawned by the lollms-webui service that are not part of normal model inference workflows
Detection Strategies
- Inspect application logs for apply_settings invocations whose config payloads contain path separators or parent-directory references
- Compare configuration files against a known-good baseline to identify unauthorized modifications
- Monitor for anomalous process ancestry where the lollms-webui interpreter spawns shells, package managers, or network utilities
Monitoring Recommendations
- Enable verbose logging on the save_settings route and forward events to a centralized log platform
- Alert on file writes by the lollms-webui process outside its designated configuration and cache directories
- Track outbound network connections from the lollms-webui host to detect post-exploitation callbacks
How to Mitigate CVE-2024-3435
Immediate Actions Required
- Upgrade parisneo/lollms-webui to version 9.5 or later, which includes commit bb99b59e710d00c4f2598faa5e183fa30fbd3bc2
- Restrict network exposure of the lollms-webui service to trusted local users only
- Audit configuration files for unauthorized path entries prior to restarting the service
- Rotate any credentials or API keys that were accessible to the lollms-webui process
Patch Information
The maintainer addressed the traversal bypass in commit bb99b59e. The fix hardens input handling in apply_settings so submitted configuration values cannot escape the intended directory. Upgrading to a release that includes this commit is the authoritative remediation.
Workarounds
- Bind the lollms-webui listener to 127.0.0.1 and require an authenticated reverse proxy for external access
- Run the service under a dedicated low-privilege user with write access limited to its configuration directory
- Apply operating system mandatory access controls (AppArmor or SELinux) to constrain file writes and process execution
- Disable or block the save_settings route at the reverse proxy layer until the upgrade is applied
# Configuration example: upgrade lollms-webui and restrict listener
pip install --upgrade lollms-webui
# Bind to localhost only and run behind an authenticated proxy
lollms-webui --host 127.0.0.1 --port 9600
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

