🇰🇷 한글 설명
Rucio 1.30.0 이상 35.8.5 이전 버전의 FilterEngine.create_postgres_query() 함수에서 SQL injection 취약점이 발견되었습니다. DID 검색 엔드포인트를 통해 인증된 사용자가 PostgreSQL 메타데이터 데이터베이스에 임의의 SQL을 실행할 수 있으며, postgres_meta 플러그인 사용 시 민감한 데이터 유출, 수정, 삭제 또는 코드 실행이 가능합니다.
💡 쉬운 설명
Rucio라는 데이터 관리 소프트웨어에서 특정 버전에 보안 구멍이 있어 로그인한 사용자가 데이터베이스를 직접 조작할 수 있습니다. 이를 통해 중요한 정보를 빼낼 수 있으며 데이터를 변조하거나 삭제할 수도 있습니다.
🇺🇸 원문 (English)
### Summary
A SQL injection vulnerability exists in Rucio versions 1.30.0 and later before 35.8.5, 38.5.5, 39.4.2, and 40.1.1, in `FilterEngine.create_postgres_query()`. This allows any authenticated Rucio user to execute arbitrary SQL against the PostgreSQL metadata database through the DID search endpoint (`GET /dids/<scope>/dids/search`). When the `postgres_meta` metadata plugin is configured, attacker-controlled filter keys and values are interpolated directly into raw SQL strings via Python `.format()`, then passed to `psycopg3`'s `sql.SQL()` which treats the string as trusted SQL syntax.
Depending on the database privileges assigned to the service account, exploitation can expose sensitive tables, modify or delete metadata, access server-side files, or achieve code execution through PostgreSQL features such as COPY ... FROM PROGRAM. This issue affects deployments that explicitly use the postgres_meta metadata plugin. This vulnerability has been fixed in versions 35.8.5, 38.5.5, 39.4.2, and 40.1.1.
📍 영향받는 시스템
Rucio 1.30.0~35.8.4, 36.x~38.5.4, 39.0~39.4.1, 40.0.0 (postgres_meta 플러그인 사용 시)
⚔️ 공격 벡터
인증된 사용자가 GET /dids/<scope>/dids/search 엔드포인트의 필터 파라미터에 SQL 구문을 삽입하여 실행
🛡️ 대응 방법
Rucio를 35.8.5, 38.5.5, 39.4.2, 40.1.1 이상으로 업그레이드하거나 postgres_meta 플러그인 사용 중지
🔧 검증 코드
설치된 Rucio 버전이 35.8.5, 38.5.5, 39.4.2, 40.1.1 이상이면 안전하며, 그 이하 버전에서 postgres_meta 플러그인을 사용 중이면 긴급 업그레이드 필요
pip show rucio 2>/dev/null | grep -i version || python -c "import rucio; print(f'Version: {rucio.__version__}')" 2>/dev/null