parisneo/lollms Local File Inclusion (LFI) attack
Date: 2024-06
Affected: pip/lollms
Attack vector: path-traversal
Category: vulnerability-disclosure
Severity: Critical
CVE: CVE-2024-4315
CVE-2024-4881
CWE: CWE-22
CWE-36
CVSS: 9.1 (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H)

parisneo/lollms version 9.5 is vulnerable to Local File Inclusion (LFI) attacks due to insufficient path sanitization. The `sanitize_path_from_endpoint` function fails to properly sanitize Windows-style paths (backward slash `\`), allowing attackers to perform directory traversal attacks on Windows systems. This vulnerability can be exploited through various routes, including `personalities` and `/del_preset`, to read or delete any file on the Windows filesystem, compromising the system's availability.


Mitigations:

Architectural layers (MAESTRO):