Code InjectionWeakness · CWE-94

CVE-2026-61450

MEDIUM · 6.5 CVSS v3.1 Published 2026-07-10
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
71/100
Remediation priority · Elevated
Remotely reachable Zero-click 6 weeks old

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Grav CMS before 2.0.2 has an incomplete Twig sandbox fix. While 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 grav.offsetGet('config'), which returns the real Config object. Allow-listed object-dumping filters (json_encode, print_r, yaml_encode) then serialize this object without invoking the sandbox method gate, exposing sensitive config data including SMTP credentials, API keys, and plugin DB credentials.

MitigationUpgrade Grav to version 2.0.2 or later which contains the complete sandbox fix. If immediate upgrade is not possible, restrict admin.pages permissions to prevent untrusted users from writing pages.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed Grav CMS version
    Locate the version file or bootstrap file (commonly version.php or system/src/Grav/Common/Version.php) or check the admin dashboard for the version number. Compare against the affected range: versions before 2.0.2 are vulnerable.
    Affected if Installed Grav CMS version is lower than 2.0.2
  2. Determine if untrusted users can write Twig templates
    Check admin panel permissions for admin.pages or admin.plugins, or examine the system/config/security.yaml file for role-based access controls. Look for whether non-admin users have permission to create or edit Twig templates or page content that supports Twig.
    Affected if Untrusted or low-privilege users have permission to write or edit Twig templates or page content
  3. Verify if the sandbox bypass pattern exists in any custom templates
    Search template files (*.twig) for the pattern grav.offsetGet('config') or similar container access patterns that could retrieve the raw Config object. Also check for use of filters like json_encode, print_r, or yaml_encode on config objects.
    Affected if Any template contains code that accesses the container directly to obtain the config object and serializes it
  4. Check for sensitive credentials in Grav configuration
    Examine the user/config/ directory for configuration files (such as mailer.yaml, plugins/*.{yaml,yml}, or system.yaml) that may contain SMTP credentials, API keys, or database credentials.
    Affected if SMTP credentials, API keys, plugin credentials, or other sensitive data are stored in Grav configuration files and the CMS version is below 2.0.2
  5. Confirm admin access by untrusted users
    Review the user/accounts/ directory and admin permissions in system/config/security.yaml to identify whether any user accounts with limited trust levels have admin panel access.
    Affected if Users who should not have full admin privileges have the ability to access the admin panel and modify pages or templates

A user is affected if their Grav CMS installation is version 2.0.2 or earlier AND untrusted users can write Twig template code or access the admin panel to expose the raw config object via grav.offsetGet('config') combined with object-dumping filters.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade Grav to version 2.0.2 or later which contains the complete sandbox fix. If immediate upgrade is not possible, restrict admin.pages permissions to prevent untrusted users from writing pages.

Recommended fix High confidence

Grav CMS 2.0.2 or later

  1. 1. Backup your Grav CMS installation and database before performing any upgrades.
  2. 2. Upgrade Grav CMS to version 2.0.2 or later.
  3. 3. After upgrading, verify that the Twig sandbox properly restricts access to configuration secrets.
  4. 4. Test by attempting to access config secrets through the Twig sandbox using a low-privilege page author account to confirm the vulnerability is remediated.

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation3.0 h
  • Testing2.0 h
  • Review / QA1.0 h
8.0 hours of engineering $1,420
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,272.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-61450 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-61450 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data