LoLLMS Path Traversal vulnerability
The application failed to properly validate file paths containing backslashes, allowing an attacker to traverse directories and read or delete arbitrary files on a Windows system. This could expose sensitive information such as environment variables, database files, and configuration files.
parisneo/lollms
Originally disclosed on huntr
A path traversal vulnerability exists in the parisneo/lollms application, affecting version 9.4.0 and potentially earlier versions, but fixed in version 9.5.0. The vulnerability arises due to improper validation of file paths between Windows and Linux environments, allowing attackers to traverse beyond the intended directory and read any file on the Windows system. Specifically, the application fails to adequately sanitize file paths containing backslashes (\), which can be exploited to access the root directory and read, or even delete, sensitive files. This issue was discovered in the context of the /user_infos endpoint, where a crafted request using backslashes to reference a file (e.g., \windows\win.ini) could result in unauthorized file access. The impact of this vulnerability includes the potential for attackers to access sensitive information such as environment variables, database files, and configuration files, which could lead to further compromise of the system.
From the GitHub Advisory Database (GHSA-p8h7-c8gw-6x8c, CC BY 4.0).
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application did not normalise or reject backslash characters in file paths, so Windows treated them as directory separators and allowed escaping the intended directory.
Impact
An attacker could read or delete sensitive files on the Windows system, potentially leading to further compromise.
What the attacker needed
Windows system; access to the /user_infos endpoint
The fix
The vulnerability was fixed in version 9.5.0 by properly validating file paths.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A path traversal bug lets someone trick a program into opening files outside the folder it is supposed to use. Here, the program did not check backslashes properly on Windows, so an attacker could ask for a file like the system's win.ini and see its contents. This could reveal secrets stored in files.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.