CVE-2026-61450: Improper Control of Generation of Code ('Code Injection') in getgrav grav
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.
AI Analysis
Technical Summary
CVE-2026-61450 describes a vulnerability in Grav CMS prior to version 2.0.2 where the Twig sandbox intended to restrict access to configuration data is bypassed. Although the 'config' variable is replaced with a redacted facade and certain methods are removed from the allowlist, the underlying configuration container remains accessible through the allow-listed grav.offsetGet('config') method. This returns the real Config object, which can then be serialized by allow-listed object-dumping filters such as json_encode, print_r, and yaml_encode without sandbox restrictions. This exposes the entire configuration tree, including sensitive plugin secrets like SMTP credentials, API keys, and database credentials. The issue represents an incomplete fix for a previous advisory (GHSA-j274-39qw-32c9).
Potential Impact
An attacker with permissions to author pages or write to user/pages can exfiltrate sensitive configuration secrets from the Grav CMS installation. This includes SMTP credentials, API keys, and plugin database credentials, potentially leading to further compromise of the system or connected services. The vulnerability has a CVSS 4.0 base score of 7.1, indicating high severity with network attack vector, low attack complexity, and no privileges required beyond page authoring.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided in the available data. Until a patch is available, restrict page authoring permissions to trusted users only and monitor for suspicious activity related to configuration data access. Avoid exposing sensitive configuration data via object-dumping filters in Twig templates.
CVE-2026-61450: Improper Control of Generation of Code ('Code Injection') in getgrav grav
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.
CVSS v4.0
Score 7.1high
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-61450 describes a vulnerability in Grav CMS prior to version 2.0.2 where the Twig sandbox intended to restrict access to configuration data is bypassed. Although the 'config' variable is replaced with a redacted facade and certain methods are removed from the allowlist, the underlying configuration container remains accessible through the allow-listed grav.offsetGet('config') method. This returns the real Config object, which can then be serialized by allow-listed object-dumping filters such as json_encode, print_r, and yaml_encode without sandbox restrictions. This exposes the entire configuration tree, including sensitive plugin secrets like SMTP credentials, API keys, and database credentials. The issue represents an incomplete fix for a previous advisory (GHSA-j274-39qw-32c9).
Potential Impact
An attacker with permissions to author pages or write to user/pages can exfiltrate sensitive configuration secrets from the Grav CMS installation. This includes SMTP credentials, API keys, and plugin database credentials, potentially leading to further compromise of the system or connected services. The vulnerability has a CVSS 4.0 base score of 7.1, indicating high severity with network attack vector, low attack complexity, and no privileges required beyond page authoring.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch links are provided in the available data. Until a patch is available, restrict page authoring permissions to trusted users only and monitor for suspicious activity related to configuration data access. Avoid exposing sensitive configuration data via object-dumping filters in Twig templates.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-07-09T14:06:14.016Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a51062d68715ace43b84ad6
Added to database: 07/10/2026, 14:48:13 UTC
Last enriched: 07/10/2026, 15:02:31 UTC
Last updated: 08/24/2026, 11:39:21 UTC
Views: 132
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.