Skip to main content
CVE Vulnerability Database

CVE-2024-6394: Lollms Web UI Path Traversal Vulnerability

CVE-2024-6394 is a path traversal flaw in Lollms Web UI that enables attackers to access arbitrary files on the server, including SSH keys and configuration data. This article covers technical details, affected versions, and mitigations.

Published:

CVE-2024-6394 Overview

CVE-2024-6394 is a Local File Inclusion (LFI) vulnerability in parisneo/lollms-webui versions below v9.8. The flaw resides in the serve_js function within app.py, where user-supplied input is concatenated into a file path without validation. Attackers can exploit this weakness to perform path traversal and read arbitrary files from the underlying server. Successful exploitation can expose private SSH keys, application configuration files, and source code. The issue is remotely exploitable over the network without authentication or user interaction, and it maps to [CWE-29: Path Traversal: \..\filename].

Critical Impact

Unauthenticated remote attackers can read arbitrary files from the server, including SSH keys and configuration secrets, enabling deeper compromise.

Affected Products

  • parisneo/lollms-webui versions prior to v9.8
  • Lollms Web UI 9.8 (per NVD CPE data)
  • Deployments exposing the Lollms Web UI HTTP interface

Discovery Timeline

  • 2024-09-30 - CVE-2024-6394 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-6394

Vulnerability Analysis

The vulnerability exists in the serve_js handler defined in app.py. This function is responsible for serving JavaScript assets requested by clients. Instead of restricting requests to a whitelisted asset directory, the function concatenates the attacker-controlled path segment directly with a base directory. No canonicalization or traversal-sequence filtering is applied before the file is opened and returned in the HTTP response.

Because the request is processed server-side and the response contains the file contents, an attacker can retrieve any file the Lollms process has permission to read. Depending on how the service is deployed, this frequently includes application source code, .env files, database credentials, and SSH private keys stored under the service account's home directory.

Root Cause

The root cause is unverified path concatenation combined with missing normalization of .. sequences. The serve_js function trusts the requested resource name and does not enforce that the resolved path remains inside the intended static asset directory, violating [CWE-29].

Attack Vector

Exploitation is performed over the network by issuing a crafted HTTP request to the endpoint served by serve_js. The attacker supplies a path containing traversal sequences such as ../../../../etc/passwd or references to files like ~/.ssh/id_rsa. No credentials are required, and no user interaction is involved.

No verified public exploit code is available for CVE-2024-6394. Technical details are documented in the Huntr Bounty Listing.

Detection Methods for CVE-2024-6394

Indicators of Compromise

  • HTTP requests to Lollms Web UI JavaScript-serving endpoints containing ../ or URL-encoded %2e%2e%2f traversal sequences
  • Access log entries returning non-JavaScript file contents such as /etc/passwd, id_rsa, or .env from static asset routes
  • Outbound reuse of SSH keys or API tokens originating from the Lollms host shortly after suspicious inbound requests

Detection Strategies

  • Inspect web server and reverse proxy logs for path traversal patterns targeting the serve_js route
  • Deploy a Web Application Firewall (WAF) rule that blocks traversal sequences and non-.js extensions on the JavaScript asset path
  • Correlate anomalous file reads by the Lollms process with inbound HTTP requests using endpoint or host telemetry

Monitoring Recommendations

  • Alert on Lollms process access to sensitive files outside its installation directory, such as /etc/shadow, ~/.ssh/, or .env files
  • Monitor egress traffic from the Lollms host for signs of credential reuse after suspicious inbound requests
  • Track version fingerprints of deployed Lollms instances to identify hosts still running versions below v9.8

How to Mitigate CVE-2024-6394

Immediate Actions Required

  • Upgrade parisneo/lollms-webui to version v9.8 or later, which addresses the serve_js path handling
  • Rotate any credentials, SSH keys, or API tokens accessible from the Lollms host if exploitation is suspected
  • Restrict network exposure of the Lollms Web UI to trusted networks or place it behind an authenticated reverse proxy

Patch Information

The vendor fixed the vulnerability in parisneo/lollms-webuiv9.8. Refer to the Huntr Bounty Listing for the fix reference and technical acknowledgment.

Workarounds

  • Place the Lollms Web UI behind a reverse proxy that strips or rejects .. and encoded traversal sequences in URL paths
  • Run the Lollms process under a dedicated low-privilege service account with no access to SSH keys or system configuration files
  • Apply mandatory access control such as AppArmor or SELinux to constrain readable paths for the Lollms process
bash
# Example nginx rule to block traversal attempts targeting the JS asset path
location ~ /serve_js/ {
    if ($request_uri ~* "(\.\./|%2e%2e/|%2e%2e%2f)") {
        return 403;
    }
    proxy_pass http://lollms_upstream;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.