🇰🇷 한글 설명
@fastify/oauth2 플러그인의 7.2.0 버전부터 8.3.0 미만 버전에서 OAuth 상태 및 PKCE 코드 검증 시 쿠키를 예측 가능한 방식으로 비교하는 취약점이 발견되었습니다. 공격자가 동일한 도메인의 서브도메인을 통해 쿠키를 조작할 수 있다면, 피해자의 브라우저에서 공격자의 계정으로 로그인하게 만드는 Login CSRF 공격이 가능합니다.
💡 쉬운 설명
공격자가 피해자의 웹 브라우저에 가짜 로그인 정보를 몰래 심어, 피해자가 자신도 모르게 공격자의 계정으로 로그인하게 만드는 보안 결함입니다. 이로 인해 피해자의 개인 정보가 유출되지는 않지만, 피해자의 활동이 공격자의 계정에 기록될 위험이 있습니다.
🇺🇸 원문 (English)
@fastify/oauth2 is an OAuth 2.0 plugin for Fastify. In versions from 7.2.0 up to but not including 8.3.0, the plugin validates the OAuth state, and with PKCE the code verifier, by comparing the callback query parameter against an unprefixed, predictable cookie, with no server-side binding to the browser that began the flow. Any party able to write a cookie for the application's host, such as a sibling subdomain under the same registrable domain, can plant matching state and verifier cookies and complete an attacker-owned OAuth flow inside a victim's browser, silently signing the victim in to the attacker's account (login CSRF). It does not expose the victim's own account, credentials, or tokens. The issue is fixed in @fastify/oauth2 8.3.0, which adds an opt-in hostPrefixedCookies option. Users should upgrade to 8.3.0 and enable it, or bind state to a server-side session.
📍 영향받는 시스템
@fastify/oauth2 versions 7.2.0 to < 8.3.0
⚔️ 공격 벡터
동일한 등록 가능 도메인 내의 서브도메인을 이용해 조작된 state 및 verifier 쿠키를 주입하는 방식
🛡️ 대응 방법
@fastify/oauth2를 8.3.0 이상으로 업그레이드하고 hostPrefixedCookies 옵션을 활성화하거나 서버 측 세션에 상태를 바인딩하십시오.
🔧 검증 코드
출력된 결과에서 @fastify/oauth2의 버전이 8.3.0 미만인지 확인하십시오.
📊 CVSS Vector String
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N
💻 영향받는 소프트웨어
IBM WebSphere Application Server