CVE-2026-61842: Grav: Twig sandbox config exfiltration via grav.offsetGet + dump filter (CVE-2026-44738 bypass)
Grav is a file-based Web platform. Prior to 2.0.2, the Grav Twig content sandbox permits grav.offsetGet('config') to return the raw configuration object and permits jsonencode, printr, yamlencode, and string filters to serialize that object without passing through GravSecurityPolicy::checkMethodAllowed. A user with page-author permissions can render sandboxed content that exposes plugins. configuration secrets, including SMTP credentials, API keys, and plugin database credentials. This issue is fixed in version 2.0.2.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Gravto a version that resolves this vulnerability.Fixed in 2.0.2
Event History
Frequently Asked Questions
Who can exploit this issue?
An attacker needs page-author permissions in Grav. They can use sandboxed content rendering to access the raw configuration object.
What information could be exposed?
The issue can expose secrets stored under plugins.* configuration, including SMTP credentials, API keys, and plugin database credentials. The impact is limited to confidentiality; integrity and availability are not affected according to the provided vector.
Are unpatched Grav installations affected by default?
The provided information states that Grav versions prior to 2.0.2 are affected, but it does not specify whether a particular default configuration or plugin setup is required. Exposure depends on whether a page author can render sandboxed content and whether sensitive plugin configuration is present.
How can I tell whether an installation is affected?
Check whether Grav is running a version earlier than 2.0.2 and whether users with page-author permissions can create or modify sandboxed Twig-rendered content. Also review plugins.* configuration for SMTP credentials, API keys, or database credentials that could be exposed.
What is the remediation?
Upgrade Grav to version 2.0.2, which fixes the issue. If upgrading cannot occur immediately, restrict page-author access and prevent untrusted authors from rendering sandboxed content.