BuzzPHP
LightDarkSystem

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

High severity. Published 17 September 2026. Update getgrav/grav to 2.0.16 or later: composer update getgrav/grav.

Which versions are affected?

PackageAffected versionsFixed in
getgrav/grav (opens in a new tab)< 2.0.162.0.16

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show getgrav/grav
composer audit

Advisory details

SeverityHighCVSS 6.5
Published
Updated
CVECVE-2026-72698 (opens in a new tab)
GHSAGHSA-p597-crqc-m349 (opens in a new tab)
WeaknessCWE-200

What the advisory says

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.

Source: GHSA-p597-crqc-m349 (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

Other recent advisories for this package

All Composer security advisories