Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-112781 Overview
CVE-2026-112781 is an information disclosure vulnerability in Grav, the flat-file content management system (CMS). The flaw affects versions 2.0.0 through 2.2.1 and is resolved in 2.2.2. Page editors can read protected configuration values by injecting config-*@ directives into page frontmatter forms. The directive bypasses the Twig sandbox config_denied_paths redaction and exposes the retrieved configuration to any site visitor who renders the affected page. Attackers with page-edit permission can harvest security.salt, plugin credentials, and Redis passwords. This issue is categorized under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Critical Impact
Authenticated page editors can exfiltrate security.salt, third-party plugin API credentials, and Redis passwords, enabling session forgery and lateral movement into caching infrastructure.
Affected Products
- Grav CMS versions 2.0.0 through 2.2.1
- Grav sites that grant any page-edit permission to non-administrator users
- Grav deployments relying on Twig sandbox config_denied_paths for secret redaction
Discovery Timeline
- 2026-10-19 - CVE-2026-112781 published to the National Vulnerability Database (NVD)
- 2026-10-20 - Last updated in NVD database
Technical Details for CVE-2026-112781
Vulnerability Analysis
Grav processes page content through a Twig templating sandbox that enforces a config_denied_paths deny list. The deny list redacts sensitive configuration keys such as system.security.salt when they are referenced from untrusted templates. Frontmatter forms accept config-*@ directives that pull configuration values directly into form field defaults. The directive resolution path does not consult the Twig sandbox deny list before returning data. Any value reachable through Grav's configuration tree becomes available to the editor through the form rendering pipeline. The rendered form fields are served to every visitor who requests the page, including unauthenticated users. The impact scope therefore extends from the editor to the entire anonymous audience of the site.
Root Cause
The redaction logic lives in the Twig sandbox layer, while frontmatter form directives read configuration through a separate code path. The config-*@ directive handler trusts the editor's input and resolves arbitrary configuration keys without applying the deny list. Trust boundaries between the form directive subsystem and the sandbox were not aligned, leaving security.salt, plugin API tokens, and Redis credentials reachable through editor-controlled frontmatter.
Attack Vector
An authenticated user with page-edit permission opens or creates a page and injects a form definition into the frontmatter. The form field uses a config-*@ directive pointing at a sensitive configuration path, for example config-security.salt@ or a plugin credential key. When Grav renders the page, the resolved secret appears inside the form markup served to visitors. The attacker can retrieve the value directly or exfiltrate it through any anonymous page view. Exploitation requires no social engineering, no user interaction from the victim, and no additional network access beyond standard HTTP requests. See the GitHub Security Advisory GHSA-8wwq-x3w5-fxmw and the VulnCheck Advisory for Grav for additional technical context.
Detection Methods for CVE-2026-112781
Indicators of Compromise
- Page frontmatter containing config-*@ directives that reference security, plugins, or system.cache.redis configuration paths
- Unexpected form fields in rendered pages whose default values resemble long random strings, API tokens, or hashed secrets
- Audit log entries showing edits to pages by non-administrator accounts shortly before the appearance of new form directives
Detection Strategies
- Scan the user/pages directory for frontmatter strings matching config- followed by a configuration path and the @ suffix
- Diff current page files against version control history to identify newly introduced form definitions touching sensitive namespaces
- Monitor outbound HTTP responses for strings matching known values of security.salt or plugin credentials, which indicates active exposure
Monitoring Recommendations
- Enable Grav access logging and forward editor activity to a central security information and event management (SIEM) platform for review
- Alert on page-edit API calls from accounts that do not normally publish content
- Rotate security.salt and plugin credentials after any detection event and track reuse of leaked values across authentication logs
How to Mitigate CVE-2026-112781
Immediate Actions Required
- Upgrade Grav to version 2.2.2 or later across all environments
- Rotate security.salt, plugin credentials, and Redis passwords on any site that ran a vulnerable release while non-administrator editors held page-edit permission
- Audit user/pages for existing config-*@ directives and remove any that reference sensitive configuration paths
Patch Information
The Grav maintainers released version 2.2.2, which resolves CVE-2026-112781 by aligning the form directive resolver with the Twig sandbox config_denied_paths deny list. Review the GitHub Security Advisory GHSA-8wwq-x3w5-fxmw for the official fix details and upgrade guidance.
Workarounds
- Temporarily revoke page-edit permission from untrusted accounts until the upgrade to 2.2.2 is complete
- Restrict editor access to administrator accounts only through Grav's access control list configuration
- Review and remove any custom form definitions that reference configuration data through directive syntax
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

