Executive brief
Grav is a flat-file content management system that uses Twig templates with a sandbox to let content authors write dynamic pages safely. A flaw in the array filter allows a content author to bypass the sandbox and read the entire site configuration, including database credentials, API keys, SMTP passwords, Redis credentials, and OAuth secrets. This disclosure is visible to all website visitors, including anonymous users.
Technical details
The array filter lacks the needs_is_sandboxed guard present in similar filters and calls toArray() or (array) cast without consulting the sandbox method allowlist. An attacker with content authoring permissions can invoke grav|array to access the raw Pimple dependency injection container's $values array, then cast the Config object to retrieve the entire unredacted configuration tree. The vulnerability affects Grav 2.0.0–2.0.24; version 2.0.25 applies the sandbox guard to the array and yaml filters.
Affected products
- getgrav Grav 2.0.0 through 2.0.24
Timeline
- 2026-09-09: disclosed
- 2026-09-26: advisory
- 2026-09-26: patched: Grav 2.0.25 released