🔍 CVE-2026-84305

0.0
CVSS Score
UNKNOWN
2026-09-01
2026-09-09 21:09
✅ 완료

🇰🇷 한글 설명

Python의 sqlparse 모듈 0.6.0 미만 버전에서 발생하는 취약점으로, 공격자가 제어하는 괄호로 둘러싸인 튜플 리스트를 처리할 때 CPU 자원을 과도하게 소모하는 문제입니다. 특정 입력값에 대해 재귀적인 토큰 트리 재구축 과정이 반복되면서 이차 함수적인 CPU 소비를 유발하여 서비스 지연이나 워커 고갈을 일으킬 수 있습니다.

💡 쉬운 설명

특수하게 조작된 SQL 문장을 입력하면 컴퓨터의 두뇌 역할을 하는 CPU가 계산을 반복하느라 과부하가 걸리는 문제입니다. 이로 인해 웹사이트가 느려지거나 서버가 응답하지 않는 상태가 될 수 있습니다.

🇺🇸 원문 (English)

sqlparse is a non-validating SQL parser module for Python. Prior to 0.6.0, sqlparse.format(sql, reindent=True) and sqlformat --reindent route attacker-controlled parenthesized tuple lists through ReindentFilter._get_offset() in sqlparse/filters/reindent.py, where _flatten_up_to_token() repeatedly rebuilds and joins the statement prefix. Thousands of offset calculations walk an expanding token tree, producing quadratic CPU consumption for inputs that remain below MAX_GROUPING_TOKENS and causing request delays, reduced throughput, or worker starvation. This issue is fixed in version 0.6.0.

📍 영향받는 시스템

sqlparse versions prior to 0.6.0

⚔️ 공격 벡터

공격자가 조작된 SQL 문장(괄호가 포함된 튜플 리스트)을 sqlparse.format() 또는 sqlformat 명령어로 전달

🛡️ 대응 방법

sqlparse 라이브러리를 0.6.0 버전 이상으로 업데이트

🔧 검증 코드

출력된 Version 값이 0.6.0 미만이면 취약한 상태이며, 0.6.0 이상이면 안전합니다.

Shell / Script
pip show sqlparse | grep Version

💻 영향받는 소프트웨어

Python