CVE-2026-100668 Grav before 2.0.25 Sandbox Escape via array Filter
Attackers can exploit a Twig sandbox escape in Grav CMS to disclose sensitive configuration secrets, including credentials and API keys, to anonymous visitors.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-100668?
CVE-2026-100668 is a high-severity vulnerability in getgrav grav, published on 26 Sep 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
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.
Weakness: CWE-200
Which versions are affected by CVE-2026-100668?
How do I fix CVE-2026-100668?
No fix has been published for CVE-2026-100668 yet. Limit exposure of the affected software until one is available.
Is CVE-2026-100668 being exploited?
There is no known exploitation of CVE-2026-100668 in the wild and no public exploit code.
Sources
Also known as GHSA-59qm-58v5-gvc5, GHSA-g565-6qmq-w49v.