🇰🇷 한글 설명
Crawl4AI 버전 0.8.0 이전에는 Docker API 배포에서 원격 코드 실행 취약성이 있습니다. /crawl 엔드포인트는 Python 코드가 포함된 hooks 매개 변수를 허용하며, exec() 함수를 사용하여 실행됩니다. __import__ 내장 함수가 허용된 내장 함수에 포함되어 있으므로, 인증되지 않은 원격 공격자는 임의의 모듈을 가져오고 시스템 명령을 실행할 수 있습니다. 성공적인 공격으로 인해 서버가 완전히 손상될 수 있으며, 임의의 명령 실행, 파일 읽기 및 쓰기,敏感 데이터 유출 및 내부 네트워크 내에서 수평 이동이 가능합니다.
💡 쉬운 설명
Crawl4AI의 일부 버전은 원격에서 코드를 실행할 수 있는 취약성을 가지고 있습니다. 이는 서버를 완전히 손상시키고, 중요한 데이터를 유출시키거나 내부 네트워크에서 이동할 수 있습니다. 최신 버전으로 업데이트하는 것이 중요합니다.
🇺🇸 원문 (English)
Crawl4AI versions prior to 0.8.0 contain a remote code execution vulnerability in the Docker API deployment. The /crawl endpoint accepts a hooks parameter containing Python code that is executed using exec(). The __import__ builtin was included in the allowed builtins, allowing unauthenticated remote attackers to import arbitrary modules and execute system commands. Successful exploitation allows full server compromise, including arbitrary command execution, file read and write access, sensitive data exfiltration, and lateral movement within internal networks.
📍 영향받는 시스템
Crawl4AI 버전 0.8.0 이전
⚔️ 공격 벡터
원격 공격자에 의한 /crawl 엔드포인트의 hooks 매개 변수 조작
🛡️ 대응 방법
Crawl4AI를 버전 0.8.0 이상으로 업데이트하고, Docker API 배포의 보안을 강화합니다.
🔧 검증 코드
로컬 Linux PC에서 Python을 사용하여 Crawl4AI의 버전을 확인합니다. pip 패키지 관리자가 설치되어 있어야 하며, Crawl4AI 패키지가 설치되어 있어야 합니다. 코드를 실행하면 Crawl4AI의 버전을 확인하고, 취약 여부를 판단하여 결과를 출력합니다.
import subprocess
output = subprocess.check_output(['pip', 'show', 'Crawl4AI']).decode('utf-8')
version = None
for line in output.split('\n'):
if 'Version:' in line:
version = line.split(':')[-1].strip()
break
if version and version < '0.8.0':
print({"result": "취약", "reason": "Crawl4AI 버전이 0.8.0 미만입니다."})
else:
print({"result": "양호", "reason": "Crawl4AI 버전이 0.8.0 이상입니다."})