🇰🇷 한글 설명
UltraJSON 5.10부터 5.11.0 버전에서 들여쓰기(indent) 매개변수 처리 중 정수 오버플로/언더플로로 인한 버퍼 오버플로 또는 무한 루프 취약점이 발견되었습니다. 공격자가 들여쓰기 값을 조작할 경우 Python 인터프리터를 충돌시키거나 서비스 거부(DoS) 상태로 만들 수 있습니다.
💡 쉬운 설명
데이터를 예쁘게 보여주기 위해 사용하는 '들여쓰기' 설정값에 너무 큰 숫자나 음수를 넣으면 프로그램이 멈추거나 꺼지는 문제입니다. 이를 통해 웹사이트나 서비스를 마비시킬 수 있습니다.
🇺🇸 원문 (English)
UltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Versions 5.10 through 5.11.0 are vulnerable to buffer overflow or infinite loop through large indent handling. ujson.dumps() crashes the Python interpreter (segmentation fault) when the product of the indent parameter and the nested depth of the input exceeds INT32_MAX. It can also get stuck in an infinite loop if the indent is a large negative number. Both are caused by an integer overflow/underflow whilst calculating how much memory to reserve for indentation. And both can be used to achieve denial of service. To be vulnerable, a service must call ujson.dump()/ujson.dumps()/ujson.encode() whilst giving untrusted users control over the indent parameter and not restrict that indentation to reasonably small non-negative values. A service may also be vulnerable to the infinite loop if it uses a fixed negative indent. An underflow always occurs for any negative indent when the input data is at least one level nested but, for small negative indents, the underflow is usually accidentally rectified by another overflow. This issue has been fixed in version 5.12.0.
📍 영향받는 시스템
UltraJSON versions 5.10 through 5.11.0
⚔️ 공격 벡터
사용자가 제어 가능한 indent 매개변수에 매우 큰 값 또는 음수를 입력하여 서비스 거부 유도
🛡️ 대응 방법
UltraJSON을 5.12.0 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 버전이 5.12.0 미만(5.10.x ~ 5.11.0)이면 취약한 상태입니다.
pip show ujson | grep Version