🇰🇷 한글 설명
Grav API 플러그인(1.0.0-rc.16 이전)은 모든 API 라우트에서 JWT 액세스 토큰을 ?token= URL 쿼리 파라미터로도 받아들입니다. 토큰이 URL에 포함되므로 웹 서버 접근 로그, Referer 헤더, 브라우저 기록, 프록시 및 CDN 로그에 그대로 남아 유효한 관리자 토큰이 노출될 수 있습니다. 유출된 토큰으로 설정 및 사용자 데이터 조회, 관리자 계정 생성, 시스템 설정 변경, 페이지 삭제 등 무단 API 접근이 가능합니다.
💡 쉬운 설명
웹사이트 관리용 로그인 열쇠를 주소창에 넣어 전달하는 방식이라, 서버 기록이나 다른 사이트로 가는 링크 정보에 열쇠가 그대로 남습니다. 이 열쇠를 가진 사람은 관리자처럼 사이트를 마음대로 바꿀 수 있습니다.
🇺🇸 원문 (English)
The Grav API plugin (getgrav/grav-plugin-api) before 1.0.0-rc.16 accepts JWT access tokens through the ?token= URL query parameter on every API route (JwtAuthenticator::extractBearerToken fallback). Because tokens are embedded in URLs, they are logged verbatim in web server access logs, leaked via the Referer header, stored in browser history, and captured by upstream proxy and CDN logs, exposing valid admin access tokens. A leaked token grants unauthorized API access, including reading configuration and user data, creating admin accounts, modifying system settings, and deleting pages.
📍 영향받는 시스템
getgrav/grav-plugin-api 1.0.0-rc.16 이전 버전
⚔️ 공격 벡터
로그, Referer 헤더, 브라우저 기록, 프록시/CDN 로그 등에서 URL에 포함된 ?token= 값을 탈취한 뒤 API 요청에 재사용
🛡️ 대응 방법
grav-plugin-api를 1.0.0-rc.16 이상으로 업데이트하고, 노출된 토큰은 폐기 후 재발급하며 ?token= 쿼리 인증을 비활성화
🔧 검증 코드
출력된 버전이 1.0.0-rc.16 미만이면 취약하며, 1.0.0-rc.16 이상이면 패치가 적용된 것입니다. 명령 결과가 없으면 플러그인 경로를 확인하세요.
grep -rE "version" user/plugins/api/blueprints.yaml 2>/dev/null | head -n 1