CVE-2026-76846

Grav before 2.0.16 Information Disclosure via Twig Sandbox

Published Aug 25, 2026 CVSS 4.0 · 8.7 High EPSS < 1% KEV · Not listed
Description
Grav before 2.0.16 contains an incomplete default denylist in the Twig sandbox configuration that fails to block access to system configuration secrets. Attackers with page-edit permission can use config.get() or config.toArray() in Twig templates to retrieve sensitive values like system.cache.redis.password when config_access is enabled.

Analysis

AI-generated

Technical impact

Grav versions before 2.0.16 contain an incomplete default denylist in the Twig sandbox configuration. This flaw allows users who can edit pages to inject Twig code that calls config.get() or config.toArray(), giving them read access to system configuration secrets such as system.cache.redis.password when config_access is enabled. The vulnerability manifests as a confidentiality breach, exposing sensitive data stored in Grav's configuration.

Affected Systems

The vulnerability affects all Grav installations using any version prior to 2.0.16. The product is Grav by getgrav, and the issue is tied to the Twig sandbox component within the CMS. No specific patch versions other than 2.0.16+ provide remediation.

Risk and Exploitability

The CVSS score of 8.7 indicates high impact, while the EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog. The attack requires the attacker to have page‑edit permissions within a Grav site; from there they can add malicious Twig code to a page. Although the attack vector is likely local or web‑based depending on the site's access controls, the potential for disclosure of configuration secrets places it in a high‑risk category.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Grav to version 2.0.16 or later.
  • If upgrading immediately is not possible, revoke or restrict page‑edit permissions and disable config_access to block the use of config.get() and config.toArray() in templates.
  • Review and extend the Twig sandbox denylist to include all internal configuration keys such as system.cache.redis.password and any other sensitive settings.

Generated by OpenCVE AI on August 25, 2026 at 03:39 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-xjw5-q542-3vmr Grav: config_denied_paths default list omits `system`, exposing real secrets (e.g. system.cache.redis.password) via the Twig sandbox when config_access is enabled
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Grav before 2.0.16 contains an incomplete default denylist in the Twig sandbox configuration that fails to block access to system configuration secrets. Attackers with page-edit permission can use config.get() or config.toArray() in Twig templates to retrieve sensitive values like system.cache.redis.password when config_access is enabled.
Title Grav before 2.0.16 Information Disclosure via Twig Sandbox
First Time appeared Getgrav
Getgrav grav
Weaknesses CWE-522
CPEs cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*
Vendors & Products Getgrav
Getgrav grav
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}

cvssV4_0

{'score': 8.7, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-522

    Insufficiently Protected Credentials

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Oct 8, 2026, 3:25 PM
Reserved
Aug 19, 2026, 8:34 PM
Status
Deferred
Published
Aug 25, 2026, 2:16 AM
Modified
Oct 12, 2026, 3:10 PM