🔍 CVE-2022-31116

7.5
CVSS Score
HIGH
2022-07-05
2026-06-17 04:44
✅ 완료

🇰🇷 한글 설명

UltraJSON 라이브러리에서 잘못된 서로게이트 문자를 포함한 JSON 문자열을 부적절하게 디코딩하는 취약점이 발견되었습니다. 이로 인해 문자열이 손상될 뿐만 아니라, 딕셔너리 내에서 키 혼동 및 값 덮어쓰기가 발생할 수 있습니다. 신뢰할 수 없는 소스의 JSON을 파싱하는 모든 사용자가 위험에 노출됩니다.

💡 쉬운 설명

데이터를 읽어오는 과정에서 특수 문자를 잘못 처리하여 데이터가 엉뚱하게 바뀌거나 다른 데이터가 덮어씌워질 수 있는 문제입니다. 해커가 조작된 데이터를 보내면 프로그램이 잘못된 정보를 처리하게 만들 수 있습니다.

🇺🇸 원문 (English)

UltraJSON is a fast JSON encoder and decoder written in pure C with bindings for Python 3.7+. Affected versions were found to improperly decode certain characters. JSON strings that contain escaped surrogate characters not part of a proper surrogate pair were decoded incorrectly. Besides corrupting strings, this allowed for potential key confusion and value overwriting in dictionaries. All users parsing JSON from untrusted sources are vulnerable. From version 5.4.0, UltraJSON decodes lone surrogates in the same way as the standard library's `json` module does, preserving them in the parsed output. Users are advised to upgrade. There are no known workarounds for this issue.

📍 영향받는 시스템

UltraJSON 5.4.0 미만 버전

⚔️ 공격 벡터

신뢰할 수 없는 출처로부터 조작된 서로게이트 문자가 포함된 JSON 데이터를 전송하여 공격

🛡️ 대응 방법

UltraJSON을 5.4.0 이상의 최신 버전으로 업그레이드

🔧 검증 코드

출력된 버전 번호가 5.4.0보다 낮은지 확인

Shell / Script
pip show ujson | grep Version

📊 CVSS Vector String

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

💻 영향받는 소프트웨어

Python