# Grav: The system, site, and theme Twig variables bypass the content sandbox entirely and are never covered by config_denied_paths

High severity, published 2026-09-17. Update getgrav/grav to 2.0.16 or later: composer update getgrav/grav.

Canonical URL: https://buzzphp.com/security/ghsa-p597-crqc-m349 · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 6.5) |
| Published | 2026-09-17 |
| Updated | 2026-09-17 |
| CVE | [CVE-2026-72698](https://nvd.nist.gov/vuln/detail/CVE-2026-72698) |
| GHSA | [GHSA-p597-crqc-m349](https://github.com/advisories/GHSA-p597-crqc-m349) |
| Weakness | CWE-200 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| getgrav/grav | < 2.0.16 | 2.0.16 |

## What to do

Update getgrav/grav to 2.0.16 or later: composer update getgrav/grav.

Check which version you run with `composer show getgrav/grav`, and every affected package with `composer audit`.

## About this advisory

Summary

Grav\Common\Twig\Twig::init() unconditionally puts the raw system, site, and theme config arrays into $this-twigvars. Twig::processPage() builds the variables for the sandboxed, editor-authored page-content render by copying that same base array ($sandboxvars = $twigvars;) and replacing only the config key with a filtered SandboxConfig facade. The system, site, and theme keys are carried into the sandboxed render completely untouched.

Because these are plain PHP arrays, not objects, Twig's sandbox SecurityPolicy (the allowedclasses/allowedmethods/allowedproperties lists in system/config/security.yaml) has no jurisdiction over them at all.

## Links

- [GHSA-p597-crqc-m349 on GitHub](https://github.com/advisories/GHSA-p597-crqc-m349)
- [CVE-2026-72698 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-72698)
- [All Composer security advisories](https://buzzphp.com/security)
