INCIDENT MAP

Browse / AI Framework and Platform Flaws / CVE-2024-5443

Remote Code Execution via path traversal bypass in lollms

CVE-2024-5443 ยท 2024-06-22 critical

Class
AI Framework and Platform Flaws (filed by a model that read the advisory)
Technique
Code and command execution
Affected
lollms (PyPI)
Gets past
Path restriction
CVSS
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.2% chance of exploitation in 30 days

How it works, in short

Empty category and folder values let the extension path resolve to the root, so a planted config.yaml causes an __init__.py to run. (Our summary, written by a model. The source text is below.)

Details

CVE-2024-4320 describes a vulnerability in the parisneo/lollms software, specifically within the ExtensionBuilder().build_extension() function. The vulnerability arises from the /mount_extension endpoint, where a path traversal issue allows attackers to navigate beyond the intended directory structure. This is facilitated by the data.category and data.folder parameters accepting empty strings (""), which, due to inadequate input sanitization, can lead to the construction of a package_path that points to the root directory. Consequently, if an attacker can create a config.yaml file in a controllable path, this path can be appended to the extensions list and trigger the execution of __init__.py in the current directory, leading to remote code execution. The vulnerability affects versions from 5.9.0, and has been addressed in version 9.5.1.

References

Source: GitHub Advisory Database, used under CC BY 4.0.