🇰🇷 한글 설명
Dalfox는 자동화에 초점을 맞춘 오픈소스 XSS 스캐너입니다. 2.13.0 이전 버전에서 REST API 서버 모드로 실행 시, 공격자가 보낸 요청 본문의 output, output-all, debug 필드가 검증 없이 로그 경로로 전달되어 임의의 파일을 생성하거나 덧붙여 쓸 수 있습니다. 기본 설정에서는 API 키가 필요하지 않아 인증되지 않은 공격자도 이를 악용할 수 있습니다.
💡 쉬운 설명
Dalfox를 서버 모드로 운영하는 경우, 외부 공격자가 요청 한 번으로 서버의 파일을 임의로 만들거나 내용을 추가할 수 있습니다. 기본 설정에서는 별도의 인증 없이 이 공격이 가능합니다.
🇺🇸 원문 (English)
Dalfox is a powerful open-source XSS scanner and utility focused on automation. Prior to 2.13.0, when dalfox is run in REST API server mode, the output, output-all, and debug fields in model.Options are JSON-tagged and deserialized directly from the attacker's request body, then propagated unchanged through dalfox.Initialize into the scan engine's logging path. The logger opens the attacker-supplied path with os.O_APPEND|os.O_CREATE|os.O_WRONLY and writes scan log lines to it. Critically, this file write block lives outside the IsLibrary guard in DalLog, so it executes even in server/library mode where file output was never intended to operate. Because no API key is required in the default configuration, an unauthenticated network caller can create or append to any file writable by the dalfox process on the host filesystem. This vulnerability is fixed in 2.13.0.
📍 영향받는 시스템
Dalfox 2.13.0 미만 버전 중 REST API 서버 모드로 실행 중인 시스템
⚔️ 공격 벡터
인증 없이 네트워크로 API 서버에 요청을 보내 output 경로를 지정하여 dalfox 프로세스가 쓰기 가능한 임의 파일을 생성하거나 덧붙이기
🛡️ 대응 방법
Dalfox를 2.13.0 이상으로 업데이트하고, 필요하지 않다면 REST API 서버 모드를 비활성화하거나 네트워크 접근을 제한
🔧 검증 코드
출력된 버전이 2.13.0 미만이면 취약하므로 업데이트가 필요하고, 2.13.0 이상이면 패치가 적용된 것입니다.
dalfox version 2>/dev/null || dpkg -l dalfox 2>/dev/null | grep dalfox