Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

ParisNeo/lollms-webui
main @ 1694c45
17
Fixes
0
CVEs
CRITICAL
Peak severity
18.8%
Coverage
Highlights
Path Traversal: 6 prior fixes. Scrutinize any change in this area.
endpoints/lollms_advanced.py: most-fixed (5 issues). Treat as high-risk during review.
16 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Path Traversal: Multiple endpoints construct filesystem paths from user-controlled app_name/folder_path without consistent sanitization; the sanitize_path regex itself was flawed (allowed 2-dot traversal) and absolute paths were not rejected.
Command Injection / Unrestricted File Access: Multiple file-open and code-folder endpoints passed user-controlled paths to os.system/subprocess with shell=True; later fixes added path regex validation and headless/exposed-mode blocks but these were applied incrementally across separate commits.
Auth Bypass / Missing Authorization: Several endpoints (preset management, avatar upload, proxy) lacked check_access()/client_id authentication, allowing unauthenticated state changes, disk exhaustion, or SSRF.