🇰🇷 한글 설명
Grav 2.0.0부터 2.0.24 버전에서 Twig 콘텐츠 샌드박스 탈출 취약점이 발견되었습니다. 공격자가 페이지 콘텐츠에 Twig 코드를 작성할 수 있다면, array 필터를 악용하여 시스템의 민감한 설정 정보와 비밀번호, 인증 키 등을 탈취할 수 있습니다.
💡 쉬운 설명
웹사이트의 보안 울타리를 넘어 시스템의 중요한 비밀번호나 설정값을 몰래 훔쳐볼 수 있는 결함입니다. 공격자가 페이지 내용을 수정할 수 있다면 누구나 관리자 권한에 필요한 민감한 정보를 볼 수 있게 됩니다.
🇺🇸 원문 (English)
Grav 2.0.0 through 2.0.24 contain a Twig content sandbox escape. The `array` filter (and its identical function form) is on the sandbox allowlist but is registered without the needs_is_sandboxed guard that print_r, vardump, json_encode, yaml_encode and string carry, and its implementation calls toArray() — or falls back to an (array) cast — without consulting the sandbox method allowlist. Because the `grav` Twig global is the raw Pimple-based dependency injection container, a user who can author Twig in page content can evaluate `grav|array` to read the container's private $values array, including the un-redacted Config service; a second array cast returns the entire configuration tree, disclosing plugin credentials, SMTP and OAuth secrets, Redis passwords, proxy URLs and the security.* subtree that the sandbox's redaction is meant to hide. Because the payload is stored in page content, the disclosed configuration is rendered to anonymous visitors. Grav 1.7 is not affected as it has no Twig content sandbox. Fixed in Grav 2.0.25.
📍 영향받는 시스템
Grav CMS 2.0.0 ~ 2.0.24
⚔️ 공격 벡터
페이지 콘텐츠 내에 Twig의 array 필터를 이용한 특수 페이로드를 삽입하여 시스템 설정 데이터에 접근
🛡️ 대응 방법
Grav CMS를 최신 보안 패치가 적용된 2.0.25 버전 이상으로 업데이트하십시오.
🔧 검증 코드
설치된 Grav의 버전을 확인하여 2.0.25 미만인 경우 취약한 상태로 판단합니다.
grep -r "Grav" /path/to/grav/user/config/ | grep -E 'version' || echo 'Check grav version via CLI'