LoLLMS vulnerable to Expected Behavior Violation
The apply_settings function in LoLLMS versions before 9.5.1 fails to properly sanitise the discussion_db_name parameter, allowing path traversal. An attacker could manipulate the path to write files to important system folders.
parisneo/lollms
Originally disclosed on huntr
A path traversal vulnerability exists in the apply_settings function of parisneo/lollms versions prior to 9.5.1. The sanitize_path function does not adequately secure the discussion_db_name parameter, allowing attackers to manipulate the path and potentially write to important system folders.
From the GitHub Advisory Database (GHSA-8mrm-r7h3-c3hj, 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 sanitize_path function does not properly validate or restrict the discussion_db_name parameter, allowing directory traversal sequences to escape the intended directory.
Impact
An attacker could potentially write to important system folders, which may lead to further compromise.
What the attacker needed
Access to the apply_settings function
The fix
The vulnerability was fixed in version 9.5.1 by improving the sanitize_path function to properly secure the discussion_db_name parameter.
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.
This is a path traversal bug. The program takes a name for a database file and uses it to build a file path, but it does not check that the name stays inside the intended folder. An attacker can use special characters like '../' to escape the folder and write files elsewhere on the system.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.