CVE-2026-100668

Grav before 2.0.25 Sandbox Escape via array Filter

Published Sep 26, 2026 CVSS 4.0 · 7.1 High EPSS < 1% KEV · Not listed
Description
Grav 2.0.0 through 2.0.24 contain a Twig content sandbox escape. The `array` filter (and its identical function form) is on the sandbox allowlist but is registered without the needs_is_sandboxed guard that print_r, vardump, json_encode, yaml_encode and string carry, and its implementation calls toArray() — or falls back to an (array) cast — without consulting the sandbox method allowlist. Because the `grav` Twig global is the raw Pimple-based dependency injection container, a user who can author Twig in page content can evaluate `grav|array` to read the container's private $values array, including the un-redacted Config service; a second array cast returns the entire configuration tree, disclosing plugin credentials, SMTP and OAuth secrets, Redis passwords, proxy URLs and the security.* subtree that the sandbox's redaction is meant to hide. Because the payload is stored in page content, the disclosed configuration is rendered to anonymous visitors. Grav 1.7 is not affected as it has no Twig content sandbox. Fixed in Grav 2.0.25.

Analysis

AI-generated

Technical impact

Grav versions from 2.0.0 through 2.0.24 lack a necessary sandbox guard on the Twig "array" filter, allowing the raw dependency injection container to be accessed and converted to an array. This results in the entire configuration tree, including sensitive credentials, being exposed to anyone who can inject Twig code into page content. The vulnerability is an information‑disclosure flaw that exposes confidential data such as plugin credentials, SMTP and OAuth secrets, Redis passwords, proxy URLs, and security-related settings.

Affected Systems

The affected products are Grav CMS (getgrav:grav) from release 2.0.0 up to and including 2.0.24. The earlier Grav 1.7 release is not affected because it does not provide a Twig content sandbox. Users of any 2.0.x release prior to 2.0.25 that allow page authors to embed Twig code are susceptible.

Risk and Exploitability

With a CVSS score of 7.1, the vulnerability poses a significant risk to confidentiality. The EPSS score is not available, and the vulnerability is not listed in CISA's KEV catalog. An attacker must possess the ability to author Twig in page content—typically a privileged content editor or a compromised account—to trigger the sandbox escape. Upon exploitation, the attacker gains read access to the full configuration tree, exposing credentials to anonymous visitors who render the affected page content.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Grav 2.0.25 or later, which includes the missing sandbox guard for the array filter.
  • If an upgrade is not immediately possible, remove or block the ability for content authors to embed Twig code, or restrict them to a whitelist of safe filters.
  • As a temporary workaround, disable the ‘grav’ Twig global or remove the ‘array’ filter from the sandbox allowlist via plugin configuration.

Generated by OpenCVE AI on September 26, 2026 at 15:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Grav 2.0.0 through 2.0.24 contain a Twig content sandbox escape. The `array` filter (and its identical function form) is on the sandbox allowlist but is registered without the needs_is_sandboxed guard that print_r, vardump, json_encode, yaml_encode and string carry, and its implementation calls toArray() — or falls back to an (array) cast — without consulting the sandbox method allowlist. Because the `grav` Twig global is the raw Pimple-based dependency injection container, a user who can author Twig in page content can evaluate `grav|array` to read the container's private $values array, including the un-redacted Config service; a second array cast returns the entire configuration tree, disclosing plugin credentials, SMTP and OAuth secrets, Redis passwords, proxy URLs and the security.* subtree that the sandbox's redaction is meant to hide. Because the payload is stored in page content, the disclosed configuration is rendered to anonymous visitors. Grav 1.7 is not affected as it has no Twig content sandbox. Fixed in Grav 2.0.25.
Title Grav before 2.0.25 Sandbox Escape via array Filter
First Time appeared Getgrav
Getgrav grav
Weaknesses CWE-200
CPEs cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*
Vendors & Products Getgrav
Getgrav grav
References
Metrics cvssV3_1

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

cvssV4_0

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

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Sep 28, 2026, 4:31 PM
Reserved
Sep 26, 2026, 2:34 AM
Status
Deferred
Published
Sep 26, 2026, 2:16 PM
Modified
Sep 28, 2026, 5:17 PM