/

CVE-2026-92917

Severity:

HIGH RISK

(7.5)

Information Disclosure (CWE-200) in Grav Twig Sandbox

CVE-2026-92917

Deferred

Vulnerability type

Category:

Information Disclosure

CWE:

CWE-200

Impact:

Exposure of Sensitive Information

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A sandbox enforcement flaw in Grav 2.0.0-rc.1 through 2.0.21 allows certain Twig dump and serialization filters to bypass content-sandbox restrictions. An authenticated user with page-edit rights may expose the merged Grav configuration, including secrets such as SMTP credentials, API tokens, webhook secrets, and cache passwords, when Twig processing is enabled.

Affected context

The issue occurs in Grav installations using the Twig content sandbox with Twig processing enabled for editable page content. The affected filters are not properly recognized as requiring sandbox enforcement because the guard checks only the global sandbox state rather than the state associated with the current template source. Grav 1.7 is not affected because it does not include the Twig content sandbox.

Exploit preconditions

  • Attack surface: Editable page content processed by Twig
  • Required access: An authenticated account with page-edit permissions
  • Trigger point: Rendering content containing an affected dump or serialization filter
  • Why exploitation is possible: The sandbox guard fails to detect the active source-level sandbox, allowing filters to inspect and render sensitive configuration data

Why this happens

The underlying bug is an authorization and sandbox-state validation failure mapped to CWE-200: Exposure of Sensitive Information. The filter protection logic queries sandbox status without providing the current template source, so it observes a global flag that is not enabled by Grav. As a result, filters capable of representing objects or configuration data remain usable in a context where sensitive application state should be restricted. The real configuration object can consequently be exposed despite facade-level path redaction.

Potential impact

  • Sensitive application configuration may be disclosed
  • SMTP credentials and API tokens could be exposed
  • Webhook secrets may be revealed
  • Cache backend passwords could be disclosed
  • Attackers could use recovered secrets for unauthorized access or lateral movement
  • Additional application and infrastructure information may be leaked

General mitigation guidance

Mitigation generally focuses on ensuring that all data-inspection and serialization filters honor the active template sandbox.

Common defensive patterns include:

  • Registering sensitive filters with explicit sandbox-enforcement metadata
  • Passing source-specific sandbox context when checking filter permissions
  • Disabling Twig processing for content authors who do not require it
  • Applying strict allowlists for filters available in user-editable content
  • Reducing the sensitivity and privileges of credentials stored in application configuration
  • Preventing secrets from being exposed through generic object representations
  • Rotating credentials if configuration disclosure may have occurred

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis of Twig extension registration and sandbox metadata
  • Code review checks for filter guards that rely only on global sandbox state
  • Tests confirming that restricted filters remain blocked in source-level sandbox contexts
  • Content and access-policy reviews for users allowed to edit Twig-enabled pages
  • Monitoring rendered page content and application logs for unusual configuration-dump expressions
  • Secret-scanning and configuration-monitoring controls for credentials appearing in rendered output

Automated security review tools may help identify unrestricted serialization filters and missing sandbox enforcement.

Sources

SourceLink
github.comgithub.com/getgrav/grav/security/advisories/GHSA-rfr9-7h4p-gx2x
vulncheck.comvulncheck.com/advisories/grav-2.0.0-rc.1-through-2.0.21-configuration-disclosure-via-print-r

Frequently asked

questions

It can be exploitable through the Grav administrative or content-management interface when page editing is available and Twig processing is enabled. It is not necessarily reachable by unauthenticated Internet users.

The attacker generally needs an authenticated account with permission to edit pages whose content is processed by Twig.

Ensure every sensitive Twig filter is explicitly subject to the active source-level sandbox, and expose only narrowly allowlisted filters in user-editable content.

Combine sandbox-aware automated tests, strict content-editor permissions, secret minimization, output monitoring, and code review rules that flag unrestricted object dumping or serialization.

Find out what's already
exploitable in your codebase.