🇰🇷 한글 설명
RestrictedPython 6.0~8.0 버전에서 Python 3.11~3.13.2의 try/except* 구문 처리 시 타입 혼동 버그를 통해 보안 제약을 우회할 수 있는 취약점입니다. 버전 8.0에서 try/except* 지원을 제거하여 패치되었으며, 알려진 임시 해결 방법은 없습니다.
💡 쉬운 설명
RestrictedPython은 신뢰할 수 없는 Python 코드를 안전하게 실행하도록 제한하는 도구인데, 특정 Python 버전에서 특정 코드 패턴을 사용하면 이 제약을 빠져나갈 수 있습니다. 버전을 업그레이드하여 해결할 수 있습니다.
🇺🇸 원문 (English)
RestrictedPython is a tool that helps to define a subset of the Python language which allows to provide a program input into a trusted environment. Via a type confusion bug in versions of the CPython interpreter starting in 3.11 and prior to 3.13.2 when using `try/except*`, RestrictedPython starting in version 6.0 and prior to version 8.0 could be bypassed. The issue is patched in version 8.0 of RestrictedPython by removing support for `try/except*` clauses. No known workarounds are available.
📍 영향받는 시스템
RestrictedPython 6.0~7.x (Python 3.11, 3.12, 3.13.0~3.13.1 환경)
⚔️ 공격 벡터
try/except* 구문을 포함한 Python 코드를 RestrictedPython으로 실행하여 제약 조건 우회 및 권한 상승
🛡️ 대응 방법
RestrictedPython을 8.0 이상으로 업그레이드하거나 Python을 3.13.2 이상으로 업데이트
🔧 검증 코드
Version 8.0 이상이면 안전, 6.0~7.x면 취약 상태
pip show restrictedpython | grep Version