CVE-2026-61450 Grav before 2.0.2 Config Exfiltration via offsetGet Filter
A Twig sandbox bypass in Grav allows page authors to exfiltrate configuration secrets like API keys and credentials via object serialization filters.
- 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-61450?
CVE-2026-61450 is a high-severity vulnerability in getgrav grav, published on 10 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Grav before 2.0.2 contains a Twig sandbox bypass that allows a page author (any admin.pages user, or anyone able to write to user/pages) to exfiltrate configuration secrets. Although the sandbox replaces the 'config' variable with a redacted facade and strips Config::get/toArray from the method allowlist, the raw container remains accessible via the allow-listed grav.offsetGet('config'), which returns the real Config object. Allow-listed object-dumping filters (json_encode, print_r, yaml_encode) then serialize that object at the PHP level without invoking the sandbox method gate, exposing the full config tree including plugin secrets such as SMTP credentials, API keys, and plugin DB credentials. This is an incomplete fix for GHSA-j274-39qw-32c9.
Weakness: CWE-94
Which versions are affected by CVE-2026-61450?
How do I fix CVE-2026-61450?
No fix has been published for CVE-2026-61450 yet. Limit exposure of the affected software until one is available.
Is CVE-2026-61450 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-61450 exists.
Sources
Also known as GHSA-xg8j-6m35-m6wr.