🇰🇷 한글 설명
ash-project의 ash_authentication_oauth2_server에서 발생하는 출력 인코딩 및 이스케이프 미흡 취약점입니다. 인증되지 않은 공격자가 WWW-Authenticate challenge 헤더에 임의의 인증 파라미터를 주입하여 공격자가 제어하는 권한 부여 서버로 유도할 수 있습니다.
💡 쉬운 설명
로그인 과정에서 사용하는 정보에 특수 문자를 섞어 넣어, 시스템이 공격자가 만든 가짜 로그인 페이지로 연결되도록 속이는 공격입니다. 이를 통해 사용자의 인증 정보를 탈취할 위험이 있습니다.
🇺🇸 원문 (English)
Improper Encoding or Escaping of Output vulnerability in ash-project ash_authentication_oauth2_server allows an unauthenticated attacker to inject arbitrary authentication parameters into the WWW-Authenticate challenge header.
BearerPlug and RequireScopePlug built the Bearer resource_metadata="..." challenge by interpolating a resource_metadata URL derived from the request tenant directly into the quoted value. In a multi-tenant application that sets the Ash tenant from request-controlled data (a subdomain, the Host, a path segment, or a header), a tenant containing a " closes the quoted value and appends attacker-chosen auth-params, including a second resource_metadata URL pointing at an attacker-controlled authorization server that spec-following clients follow. Carriage returns and line feeds are rejected by Plug, so this is parameter injection within one header, not response splitting.
This issue affects ash_authentication_oauth2_server: from 0.1.3 before 0.3.1.
📍 영향받는 시스템
ash_authentication_oauth2_server: 0.1.3 미만 0.3.1 미만 버전
⚔️ 공격 벡터
멀티테넌트 환경에서 테넌트 이름에 따옴표(")를 포함시켜 HTTP 헤더 내에 임의의 인증 파라미터를 주입
🛡️ 대응 방법
ash_authentication_oauth2_server를 0.3.1 이상의 최신 버전으로 업데이트
🔧 검증 코드
출력된 버전이 0.3.1 미만(예: 0.1.3, 0.2.0 등)이면 취약한 상태입니다.
mix deps info ash_authentication_oauth2_server 2>/dev/null | grep -E 'version'
💻 영향받는 소프트웨어
IBM WebSphere Application Server