---
id: CVE-2026-61450
title: >-
  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
summary: >-
  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 reda…
severity: medium
cvss: 6.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N'
cwe:
  - CWE-94
vendor: getgrav
product: grav
affected:
  - grav < 2.0.2
published: '2026-07-10'
updated: '2026-10-08'
sourceUpdated: '2026-10-08T16:17:25.073'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-61450'
references:
  - url: 'https://github.com/getgrav/grav/security/advisories/GHSA-mc5q-6hpj-rp7j'
    label: disclosure@vulncheck.com
  - url: >-
      https://www.vulncheck.com/advisories/grav-before-config-exfiltration-via-offsetget-filter
    label: disclosure@vulncheck.com
  - url: 'https://github.com/getgrav/grav/security/advisories/GHSA-mc5q-6hpj-rp7j'
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
tags:
  - nvd
  - cve.org
  - exploit-available
exploitAvailable: true
ssvc:
  exploitation: poc
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-07-10T15:46:11.337524Z'
epss: 0.00409
epssPercentile: 0.33064
ingestedAt: '2026-10-08T16:52:14.697Z'
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.
