CVE-2024-4320 Remote Code Execution due to LFI in '/install_extension' in parisneo/lollms-webui

Critical 9.8 Published Updated

Attackers can achieve remote code execution via local file inclusion in the install_extension endpoint of lollms-webui.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2024-4320?

CVE-2024-4320 is a critical path traversal vulnerability in parisneo/lollms-webui, published on 6 Jun 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A remote code execution (RCE) vulnerability exists in the '/install_extension' endpoint of the parisneo/lollms-webui application, specifically within the `@router.post("/install_extension")` route handler. The vulnerability arises due to improper handling of the `name` parameter in the `ExtensionBuilder().build_extension()` method, which allows for local file inclusion (LFI) leading to arbitrary code execution. An attacker can exploit this vulnerability by crafting a malicious `name` parameter that causes the server to load and execute a `__init__.py` file from an arbitrary location, such as the upload directory for discussions. This vulnerability affects the latest version of parisneo/lollms-webui and can lead to remote code execution without requiring user interaction, especially when the application is exposed to an external endpoint or operated in headless mode.

Weakness: CWE-22, CWE-29

Which versions are affected by CVE-2024-4320?

It affects 1 product.

Products include Lollms Lollms Web Ui.

How do I fix CVE-2024-4320?

No fix has been published for CVE-2024-4320 yet. Limit exposure of the affected software until one is available.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2024-4320 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-4320 exists.

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-qfjf-662j-2xxg.

Is CVE-2024-4320 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free