lollms path traversal vulnerability allows overriding of config.yaml file, leading to RCE
The `/set_personality_config` endpoint in lollms version 9.4.0 is vulnerable to path traversal, allowing an attacker to overwrite the `configs/config.yaml` file. By changing server configuration properties, an attacker could achieve remote code execution.
parisneo/lollms
Originally disclosed on huntr
A path traversal vulnerability in the /set_personality_config endpoint of parisneo/lollms version 9.4.0 allows an attacker to overwrite the configs/config.yaml file. This can lead to remote code execution by changing server configuration properties such as force_accept_remote_access and turn_on_code_validation.
From the GitHub Advisory Database (GHSA-m45c-v46h-c788, 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 endpoint fails to sanitise user-supplied file paths, allowing directory traversal to overwrite arbitrary files.
Impact
An attacker could overwrite the configuration file and change settings such as `force_accept_remote_access` and `turn_on_code_validation`, potentially leading to remote code execution.
What the attacker needed
Access to the /set_personality_config endpoint
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: a part of the web app that saves settings does not check where it is writing, so an attacker can make it write to a sensitive file outside the intended folder. By overwriting the server's configuration file, the attacker can turn on dangerous options that let them run their own code on the server.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.