🇰🇷 한글 설명
Hermes WebUI 0.51.303 이전 버전의 git_discard 함수에는 TOCTOU 경합 조건 취약점이 존재합니다. 공격자는 검증 후 삭제 전 경로 구성 요소를 심볼릭 링크로 교체하여 워크스페이스 외부의 임의 파일을 삭제할 수 있습니다.
💡 쉬운 설명
파일 삭제 과정에서 보안 검사와 실제 삭제 사이에 시간 차이가 있어 공격자가 경로를 속일 수 있습니다. 이를 통해 설정된 작업 영역 밖의 중요한 파일이 의도치 않게 삭제될 수 있습니다.
🇺🇸 원문 (English)
Hermes WebUI before version 0.51.303 contains a time-of-check time-of-use (TOCTOU) race condition vulnerability in the git_discard function within api/workspace_git.py that allows attackers to delete files outside the configured workspace boundary by replacing a validated path component with a symlink after validation but before deletion. Attackers can substitute a workspace-controlled path component with a symlink pointing to an external directory between the safe_resolve_ws() validation step and the subsequent Path.unlink() or shutil.rmtree() deletion call, causing the delete operation to follow the symlink and remove arbitrary files outside the workspace.
📍 영향받는 시스템
Hermes WebUI version < 0.51.303
⚔️ 공격 벡터
검증과 삭제 사이의 경합 조건을 이용해 심볼릭 링크로 경로를 우회
🛡️ 대응 방법
Hermes WebUI를 버전 0.51.303 이상으로 즉시 업그레이드하십시오.
🔧 검증 코드
출력된 버전이 0.51.303보다 낮으면 취약한 버전이므로 업그레이드가 필요합니다.
hermes-webui --version 2>/dev/null | grep -E '0\.51\.(30[0-2]|[0-9]{1,2})'