CRITICAL🇵🇱 Wersja polska

CVE-2024-2356

CVSS 9.6v3.0pub. 2026-02-02upd. 2026-04-15

A Local File Inclusion (LFI) vulnerability exists in the '/reinstall_extension' endpoint of the parisneo/lollms-webui application, specifically within the `name` parameter of the `@router.post("/reinstall_extension")` route. This vulnerability allows attackers to inject a malicious `name` parameter, leading to the server loading and executing arbitrary Python files from the upload directory for discussions. This issue arises due to the concatenation of `data.name` directly with `lollmsElfServer.lollms_paths.extensions_zoo_path` and its use as an argument for `ExtensionBuilder().build_extension()`. The server's handling of the `__init__.py` file in arbitrary locations, facilitated by `importlib.machinery.SourceFileLoader`, enables the execution of arbitrary code, such as command execution or creating a reverse-shell connection. This vulnerability affects the latest version of parisneo/lollms-webui and can lead to Remote Code Execution (RCE) when the application is exposed to an external endpoint or the UI, especially when bound to `0.0.0.0` or in `headless mode`. No user interaction is required for exploitation.

🤖 AI Analysis
How it works

The `name` parameter passed to the POST `/reinstall_extension` endpoint is directly concatenated with the path `lollmsElfServer.lollms_paths.extensions_zoo_path` and used as an argument for the `ExtensionBuilder().build_extension()` function. Lack of proper validation and sanitization of the `name` parameter allows an attacker to specify an arbitrary location in the upload directory. The mechanism of loading `__init__.py` file from arbitrary locations via `importlib.machinery.SourceFileLoader` causes execution of malicious Python code previously placed by the attacker, which can result in execution of system commands or establishment of a reverse shell connection.

Impact

An attacker can gain the ability to execute arbitrary code remotely (RCE) on the server, including execution of system commands or establishing a reverse shell connection, leading to complete system compromise.

Mitigation & patch

Apply the patch available in the producer's repository: commit 41dbb1b3f2e78ea276e5269544e50514252c0c25 (https://github.com/parisneo/lollms-webui/commit/41dbb1b3f2e78ea276e5269544e50514252c0c25). Until updating, it is recommended to restrict application access exclusively to trusted local networks and avoid running the server in listen mode on `0.0.0.0`.

Who is affected

The latest version of parisneo/lollms-webui application — particularly exposed are installations accessible publicly (server bound to `0.0.0.0`) or operating in `headless mode`

Analysis generated by Claude AI (Anthropic) based on NVD data. Always verify with vendor.
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
🔵
CHECK WITH VENDOR
No clear patch data available. Check vendor references.
Tags
RCE
CWE
References