🇰🇷 한글 설명
grav-plugin-login 3.8.11 이전 버전에는 login.regenerate2FASecret 프런트엔드 태스크에 CSRF 취약점이 존재합니다. 해당 태스크는 CSRF 토큰이나 Origin/Referer 검증 없이 인증된 사용자의 TOTP 시크릿을 재생성합니다. 기본 SameSite=Lax 세션 쿠키 환경에서는 공격자가 피해자를 외부 페이지로 유도해 GET 요청을 발생시켜 2FA 재등록을 강제할 수 있으며, session.samesite: Strict 설정 사이트는 영향을 받지 않습니다.
💡 쉬운 설명
로그인된 사용자가 악성 웹페이지를 방문하면, 사용자 몰래 2단계 인증(OTP) 설정이 초기화될 수 있습니다. 이로 인해 기존 인증 앱과 서버의 값이 맞지 않아 다시 등록해야 하는 상황이 발생합니다.
🇺🇸 원문 (English)
grav-plugin-login before 3.8.11 contains a cross-site request forgery (CSRF) vulnerability in the login.regenerate2FASecret frontend task, which regenerates and persists a new TOTP secret for the authenticated session user without any anti-CSRF nonce or Origin/Referer check. Because Grav core dispatches the task from the GET 'task:' URI parameter and the default session cookie is SameSite=Lax, an attacker can lure a logged-in victim to an off-site page that performs a top-level GET navigation, rotating the victim's TOTP secret so their enrolled authenticator no longer matches the server, effectively forcing 2FA re-enrollment. Sites configured with session.samesite: Strict are not affected.
📍 영향받는 시스템
grav-plugin-login 3.8.11 미만 버전을 사용하는 Grav CMS 사이트 (session.samesite가 Strict가 아닌 경우)
⚔️ 공격 벡터
피해자가 로그인된 상태에서 공격자의 외부 페이지를 방문하면 GET 요청이 자동 발생하여 TOTP 시크릿이 재생성됨
🛡️ 대응 방법
grav-plugin-login을 3.8.11 이상으로 업데이트하거나, session.samesite 설정을 Strict로 변경
🔧 검증 코드
출력된 version 값이 3.8.11 미만이면 취약, 3.8.11 이상이면 패치 완료된 것입니다. 출력이 없으면 플러그인 경로를 직접 확인해야 합니다.
grep -rE "version\s*:" $(find / -path '*grav*' -path '*login*' -name 'blueprints.yaml' 2>/dev/null | head -1) 2>/dev/null