🔍 CVE-2024-2356

9.6
CVSS Score
CRITICAL
2026-02-02
2026-04-15 14:34
✅ 완료

🇰🇷 한글 설명

parisneo/lollms-webui의 '/reinstall_extension' 엔드포인트에서 name 파라미터에 로컬 파일 포함(LFI) 취약점이 존재하며, 경로 검증 부족으로 인해 임의의 Python 파일 실행이 가능합니다. 특히 0.0.0.0으로 바인딩되거나 헤드리스 모드에서 외부 노출 시 원격 코드 실행(RCE)으로 이어집니다.

💡 쉬운 설명

lollms-webui의 확장 기능 재설치 기능에 보안 허점이 있어서 공격자가 악의적인 코드를 실행하게 만들 수 있습니다. 외부 네트워크에 노출되면 시스템이 완전히 제어될 수 있습니다.

🇺🇸 원문 (English)

A Local File Inclusion (LFI) vulnerability exists in the '/reinstall_extension' endpoint of the parisneo/lollms-webui application, specifically within the `name` parameter of the `@router.post("/reinstall_extension")` route. This vulnerability allows attackers to inject a malicious `name` parameter, leading to the server loading and executing arbitrary Python files from the upload directory for discussions. This issue arises due to the concatenation of `data.name` directly with `lollmsElfServer.lollms_paths.extensions_zoo_path` and its use as an argument for `ExtensionBuilder().build_extension()`. The server's handling of the `__init__.py` file in arbitrary locations, facilitated by `importlib.machinery.SourceFileLoader`, enables the execution of arbitrary code, such as command execution or creating a reverse-shell connection. This vulnerability affects the latest version of parisneo/lollms-webui and can lead to Remote Code Execution (RCE) when the application is exposed to an external endpoint or the UI, especially when bound to `0.0.0.0` or in `headless mode`. No user interaction is required for exploitation.

📍 영향받는 시스템

parisneo/lollms-webui (모든 버전, 최신 버전 포함)

⚔️ 공격 벡터

POST /reinstall_extension 엔드포인트의 name 파라미터에 경로 트래버설 문자열 주입으로 업로드 디렉토리의 __init__.py 파일 실행

🛡️ 대응 방법

name 파라미터 화이트리스트 검증 추가, importlib 사용 시 경로 정규화 및 기본 디렉토리 내 제한, 최신 패치 버전 업그레이드

🔧 검증 코드

설치된 버전을 확인하여 취약점 패치 버전 이상으로 업그레이드되었는지 확인합니다 (공식 보안 권고 버전 참고).

Shell / Script
python3 -c "import sys; sys.path.insert(0, '/path/to/lollms'); from lollms import __version__; print(__version__)" 2>/dev/null || echo 'not installed'

📊 CVSS Vector String

CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

💻 영향받는 소프트웨어

Python