🇰🇷 한글 설명
Hydra 1.3.4 미만 버전의 hydra.utils.instantiate() 함수는 설정 파일을 통해 임의의 Python 객체를 호출할 수 있는 취약점이 있습니다. 공격자가 제어하는 설정값이나 CLI 오버라이드를 통해 위험한 함수를 실행함으로써 임의의 코드를 실행할 수 있습니다.
💡 쉬운 설명
설정 파일을 조작하여 프로그램이 원래 의도하지 않은 위험한 명령을 실행하게 만드는 보안 약점입니다. 이를 통해 해커가 컴퓨터에 파일을 읽거나 쓰거나 프로그램을 강제로 종료할 수 있습니다.
🇺🇸 원문 (English)
Hydra is a framework for elegantly configuring complex applications. Prior to 1.3.4, hydra.utils.instantiate() resolves and calls Python objects selected by configuration through _resolve_target() in hydra/_internal/instantiate/_instantiate2.py, allowing attacker-controlled target values and arguments to choose dangerous callables. A consuming application, library, CLI workflow, or model loader that passes untrusted configuration, CLI overrides, or model metadata into hydra.utils.instantiate() can therefore execute arbitrary code in its own process, including reading or modifying files and credentials or terminating the process. Version 1.3.4 adds target blocking with an explicit HYDRA_INSTANTIATE_ALLOWLIST_OVERRIDE escape hatch. This issue is fixed in version 1.3.4.
📍 영향받는 시스템
Hydra framework versions prior to 1.3.4
⚔️ 공격 벡터
신뢰할 수 없는 설정 파일, CLI 오버라이드 또는 모델 메타데이터를 hydra.utils.instantiate()에 전달하여 공격
🛡️ 대응 방법
Hydra를 버전 1.3.4 이상으로 업데이트하거나 HYDRA_INSTANTIATE_ALLOWLIST_OVERRIDE를 사용하여 허용 목록을 설정하십시오.
🔧 검증 코드
출력된 Version이 1.3.4 미만이면 취약한 상태이며, 1.3.4 이상이면 안전합니다.
pip show hydra-core | grep -E 'Version'