🔍 CVE-2025-13372

4.3
CVSS Score
MEDIUM
2025-12-02
2026-10-18 18:10
✅ 완료

🇰🇷 한글 설명

Django의 FilteredRelation 기능에서 컬럼 별칭(column aliases)을 사용할 때 SQL 인젝션 취약점이 발견되었습니다. PostgreSQL 환경에서 딕셔너리 확장 기능을 포함한 정교하게 조작된 딕셔너리를 QuerySet.annotate() 또는 QuerySet.alias()의 **kwargs로 전달할 경우 발생할 수 있습니다.

💡 쉬운 설명

데이터베이스에 명령을 내리는 과정에서 악의적인 코드가 섞여 들어갈 수 있는 보안 약점입니다. 공격자가 이를 이용하면 데이터베이스의 정보를 몰래 빼가거나 조작할 위험이 있습니다.

🇺🇸 원문 (English)

An issue was discovered in 5.2 before 5.2.9, 5.1 before 5.1.15, and 4.2 before 4.2.27. `FilteredRelation` is subject to SQL injection in column aliases, using a suitably crafted dictionary, with dictionary expansion, as the `**kwargs` passed to `QuerySet.annotate()` or `QuerySet.alias()` on PostgreSQL. Earlier, unsupported Django series (such as 5.0.x, 4.1.x, and 3.2.x) were not evaluated and may also be affected. Django would like to thank Stackered for reporting this issue.

📍 영향받는 시스템

Django 5.2 미만(5.2.9 미만), 5.1 미만(5.1.15 미만), 4.2 미만(4.2.27 미만) 및 지원 종료된 5.0.x, 4.1.x, 3.2.x 버전

⚔️ 공격 벡터

QuerySet.annotate() 또는 QuerySet.alias() 메서드에 조작된 딕셔너리를 인자로 전달하여 SQL 인젝션 유도

🛡️ 대응 방법

Django를 최신 보안 패치 버전(5.2.9, 5.1.15, 4.2.27 이상)으로 업데이트하십시오.

🔧 검증 코드

출력된 Django 버전이 취약점이 해결된 패치 버전보다 낮은지 확인하십시오.

Shell / Script
python -c "import django; print(django.get_version())"

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

PostgreSQL