🇰🇷 한글 설명
SQLAdmin 0.27.1 미만 버전에서 ModelView.sort_query 함수가 서버 측 허용 목록을 제대로 검증하지 않는 취약점이 발견되었습니다. 공격자는 sortBy 매개변수를 조작하여 숨겨진 컬럼이나 관계형 모델의 데이터를 정렬 기준으로 사용하여 데이터의 존재 여부나 값을 유추할 수 있습니다.
💡 쉬운 설명
관리자 화면에서 정렬 기능을 악용하여 원래는 볼 수 없어야 할 숨겨진 정보를 알아낼 수 있는 보안 약점입니다. 정렬 순서가 바뀌는 것을 보고 데이터의 내용을 추측하는 방식으로 정보가 유출될 수 있습니다.
🇺🇸 원문 (English)
SQLAdmin is a flexible Admin interface for SQLAlchemy models. Prior to 0.27.1, ModelView.sort_query in sqladmin/models.py accepts the attacker-controlled sortBy list-view query parameter without enforcing the configured column_sortable_list server-side allow-list in self._sort_fields. The value is resolved with getattr and passed to relationship joins and order_by, allowing requests to sort by columns hidden from column_list and by related-model columns through dotted paths. The resulting row order forms an information-exposure oracle for unexposed values, and reversing ascending and descending order confirms their relative ordering. Pairing sortBy with searchable or filterable columns and pagination can narrow the oracle toward specific values, but exact recovery depends on the application's available fields and data. This issue is fixed in version 0.27.1.
📍 영향받는 시스템
SQLAdmin versions prior to 0.27.1
⚔️ 공격 벡터
sortBy 쿼리 매개변수에 조작된 컬럼명 또는 점 표기법(dotted paths)을 입력하여 데이터 정렬 유도
🛡️ 대응 방법
SQLAdmin 버전을 0.27.1 이상으로 업데이트하십시오.
🔧 검증 코드
출력된 Version이 0.27.1 미만이면 취약한 상태입니다.
pip show sqladmin | grep Version