🔍 CVE-2026-7504

8.1
CVSS Score
HIGH
2026-05-19
2026-10-26 13:10
✅ 완료

🇰🇷 한글 설명

Keycloak의 리다이렉트 작업 중 URL 검증 로직에서 결함이 발견되었습니다. 공격자가 악의적인 요청을 구성하면 검증을 우회하여 사용자를 승인되지 않은 URL로 리다이렉트할 수 있으며, 이는 도메인 내 민감 정보 노출이나 추가 공격으로 이어질 수 있습니다. 이 취약점은 'Valid Redirect URIs' 필드에 와일드카드(*)가 설정된 클라이언트에 영향을 미치며, 공격 성공을 위해 사용자 상호작용이 필요합니다. 원인은 Keycloak과 Java URI 구현이 URL의 user-info 구성요소를 처리하는 방식의 불일치에 있습니다.

💡 쉬운 설명

공격자가 특정 형식의 악성 링크를 만들어 사용자가 클릭하도록 유도하면, 보안 검사를 통과해 엉뚱한 사이트로 이동하게 됩니다. 이를 통해 민감한 정보가 유출되거나 추가 공격이 일어날 수 있습니다.

🇺🇸 원문 (English)

A flaw was found in Keycloak's URL validation logic during redirect operations. By crafting a malicious request, an attacker could bypass validation to redirect users to unauthorized URLs, potentially leading to the exposure of sensitive information within the domain or facilitating further attacks. This vulnerability specifically affects Keycloak clients configured with a wildcard (*) in the "Valid Redirect URIs" field and requires user interaction to be successfully exploited. The issue stems from a discrepancy in how Keycloak and the underlying Java URI implementation handle the user-info component of a URL. If a malicious redirect URL is constructed using multiple @ characters in the user-info section, Java's URI parser fails to extract the user-info, leaving only the raw authority field. Consequently, Keycloak's validation check fails to detect the malformed user-info, falls back to a wildcard comparison, and incorrectly permits the malicious redirect.

📍 영향받는 시스템

Valid Redirect URIs에 와일드카드(*)를 설정한 Keycloak 클라이언트 (버전 정보는 CVE 설명에 명시되지 않음)

⚔️ 공격 벡터

user-info 영역에 다수의 @ 문자를 포함한 악성 리다이렉트 URL을 만들어 사용자가 클릭하게 하여 검증을 우회

🛡️ 대응 방법

Keycloak을 패치된 최신 버전으로 업그레이드하고, Valid Redirect URIs에서 와일드카드(*) 사용을 제거하여 명시적인 URI만 허용

🔧 검증 코드

출력된 Keycloak 버전을 보안 권고문의 패치 버전과 비교하여, 현재 버전이 패치 이전이면 취약한 상태이고 같거나 이후이면 패치된 것입니다.

Shell / Script
docker exec $(docker ps -qf 'ancestor=quay.io/keycloak/keycloak') /opt/keycloak/bin/kc.sh --version 2>/dev/null || grep -ri 'keycloak' /opt/keycloak/version.txt 2>/dev/null

📊 CVSS Vector String

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

💻 영향받는 소프트웨어

Oracle Java SE