🇰🇷 한글 설명
BentoML 1.4.38 이전 버전의 generate_containerfile() 함수가 샌드박스 처리되지 않은 Jinja2 환경을 사용하여 사용자 제공 템플릿을 렌더링하는 취약점이 있습니다. 공격자가 제작한 악의적인 bento 아카이브를 가져와 bentoml containerize 명령을 실행할 경우, 호스트 머신에서 임의의 파이썬 코드가 실행되어 컨테이너 격리를 우회할 수 있습니다.
💡 쉬운 설명
AI 모델 배포 도구인 BentoML에서 악성 설정 파일을 통해 해커가 사용자의 컴퓨터를 원격 제어할 수 있는 보안 결함입니다. 공격자가 만든 파일을 실행하는 것만으로도 시스템의 권한을 탈취당할 수 있습니다.
🇺🇸 원문 (English)
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Prior to 1.4.38, the Dockerfile generation function generate_containerfile() in src/bentoml/_internal/container/generate.py uses an unsandboxed jinja2.Environment with the jinja2.ext.do extension to render user-provided dockerfile_template files. When a victim imports a malicious bento archive and runs bentoml containerize, attacker-controlled Jinja2 template code executes arbitrary Python directly on the host machine, bypassing all container isolation. This vulnerability is fixed in 1.4.38.
📍 영향받는 시스템
BentoML versions prior to 1.4.38
⚔️ 공격 벡터
악의적인 bento 아카이브 임포트 후 'bentoml containerize' 명령어 실행을 통한 원격 코드 실행(RCE)
🛡️ 대응 방법
BentoML 라이브러리를 1.4.38 버전 이상으로 업데이트
🔧 검증 코드
출력된 버전이 1.4.38 미만일 경우 취약하며, 1.4.38 이상일 경우 패치된 상태입니다.
pip show bentoml | grep -E 'Version: [0-9.]+'