CVE-2026-10595
Unauthenticated path traversal in lollms < 3.0 allows arbitrary file read.
- CVSS 7.5
- 23
- Input Validation and Sanitization
- Remote
A path traversal vulnerability exists in parisneo/lollms version 2.1.0, specifically in the SPA catch-all route implemented in `backend/routers/ui.py`. The vulnerability arises from the improper handling of user-controlled path input, which is directly joined into a filesystem path without sanitization or containment checks. URL-encoded dot-dot sequences (`%2e%2e`) bypass Starlette's built-in path normalization and are resolved by Python's `pathlib`, allowing an unauthenticated attacker to read arbitrary files on the server. This issue has been resolved in version 3.
- CWE
- 23
- CVSS base score
- 7.5
- Published
- 2026-08-09
- OWASP
- A01 Broken Access Control
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Input Validation and Sanitization
- Subcategory
- Path Traversal
- Accessibility scope
- Remote
- Impact
- Information Disclosure
- Affected component
- parisneo/lol
- Fixed by upgrading
- Yes
Solution
Upgrade parisneo/lollms to version 3.0 or later.
Vulnerable code sample
import pathlib
from fastapi import APIRouter, Request
from fastapi.responses import FileResponse
router = APIRouter()
# A placeholder for a configuration object holding paths
class LollmsPaths:
ui_path = pathlib.Path("front_end/dist")
lollms_paths = LollmsPaths()
@router.get("/{path:path}")
async def get_spa(request: Request, path: str):
"""
Serves Single Page Application files.
"""
if not path:
path = "index.html"
# VULNERABLE: The user-provided path is directly joined without sanitization, allowing path traversal.
static_file_path = lollms_paths.ui_path / path
if static_file_path.is_file():
return FileResponse(static_file_path)
else:
# Fallback to index.html for SPA routing
index_path = lollms_paths.ui_path / "index.html"
return FileResponse(index_path)Patched code sample
import pathlib
import os
from fastapi import APIRouter, Request, HTTPException
from fastapi.responses import FileResponse
router = APIRouter()
# A placeholder for a configuration object holding paths
class LollmsPaths:
ui_path = pathlib.Path("front_end/dist")
lollms_paths = LollmsPaths()
@router.get("/{path:path}")
async def get_spa(request: Request, path: str):
"""
Serves Single Page Application files.
"""
if not path:
path = "index.html"
base_dir = lollms_paths.ui_path.resolve()
# FIX: The requested path is resolved and checked to be within the base directory.
requested_path = (base_dir / path).resolve()
if os.path.commonpath([base_dir, requested_path]) != str(base_dir):
raise HTTPException(status_code=404, detail="Not Found")
if requested_path.is_file():
return FileResponse(requested_path)
else:
# Fallback to index.html for SPA routing
index_path = lollms_paths.ui_path / "index.html"
return FileResponse(index_path)Payload
%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd
Cite this entry
@misc{vaitp:cve202610595,
title = {{Unauthenticated path traversal in lollms < 3.0 allows arbitrary file read.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-10595},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-10595/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
