🇰🇷 한글 설명
ASTEVAL 1.0.9 미만 버전에서 FROM_PY 함수가 BaseException 하위 클래스들을 노출하여 발생하는 취약점입니다. 공격자가 제어하는 표현식이 특정 예외를 발생시키면 인터프리터의 안전 처리기를 우회하여 호출 애플리케이션으로 예외가 전파됩니다. 이로 인해 서비스가 강제 종료되거나 신호 및 정리 처리가 방해받아 서비스 거부(DoS)가 발생할 수 있습니다.
💡 쉬운 설명
프로그램이 계산을 수행할 때 예상치 못한 특수 명령어를 입력하면, 프로그램의 안전장치를 무시하고 시스템을 강제로 종료시킬 수 있는 문제입니다. 이로 인해 서비스가 멈추거나 정상적인 작동이 불가능해질 수 있습니다.
🇺🇸 원문 (English)
ASTEVAL is an evaluator of Python expressions and statements. Prior to 1.0.9, FROM_PY in asteval/astutils.py exposes BaseException, SystemExit, KeyboardInterrupt, and GeneratorExit to expressions evaluated by asteval.Interpreter.eval(), while run() and eval() in asteval/asteval.py catch Exception rather than these non-Exception BaseException subclasses. When an attacker-controlled expression raises one of these classes, on_raise() passes the class to raise_exception(), and the resulting exception bypasses the interpreter's safety handlers and propagates into the calling application. A consuming service that evaluates untrusted expressions can therefore be terminated or have signal and cleanup handling disrupted, causing denial of service. The separately documented read-only open() capability is not part of this vulnerability. This issue is fixed in version 1.0.9.
📍 영향받는 시스템
ASTEVAL 버전 1.0.9 미만
⚔️ 공격 벡터
신뢰할 수 없는 사용자가 입력한 파이썬 표현식을 통해 BaseException 계열의 예외를 발생시킴
🛡️ 대응 방법
ASTEVAL 버전을 1.0.9 이상으로 업데이트
🔧 검증 코드
출력된 버전 번호가 1.0.9보다 낮으면 취약한 상태입니다.
pip show asteval 2>/dev/null | grep Version