Skip to content
Heist/ feed
Back to feed
High

Grav before 2.0.25 Sandbox Escape via array Filter

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-100668
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 18:38 UTC · Revision 1

Source evidence

Grav before 2.0.25 Sandbox Escape via array Filter

core-osv · Original source

Published 26 Sept 2026, 13:23 UTC

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.

osv:CVE-2026-100668
Complete source record
{
  "id": "f9171eacc7c2bde73ae7a0bd9fc0db198870600e403912e02355ad7c01123729",
  "url": "https://osv.dev/vulnerability/CVE-2026-100668",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Grav before 2.0.25 Sandbox Escape via array Filter",
    "summary": "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.",
    "evidence": "osv:CVE-2026-100668",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2026-100668",
      "aliases": [
        "CVE-2026-100668",
        "GHSA-59qm-58v5-gvc5"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/getgrav/grav",
              "type": "GIT",
              "events": [
                {
                  "introduced": "bb4022f44b882ca4615188f4da5a0d646cef02ce"
                },
                {
                  "fixed": "f633bb56c2ddd0c8ac4284441f13337c46f238d0"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.0.25"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "introduced": "2.0.0"
                      },
                      {
                        "last_affected": "2.0.24"
                      }
                    ],
                    "source": "DESCRIPTION"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-100668.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:22.594692919Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/100xxx/CVE-2026-100668.json",
        "https://github.com/getgrav/grav/security/advisories/GHSA-59qm-58v5-gvc5",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-100668",
        "https://www.vulncheck.com/advisories/grav-before-2.0.25-sandbox-escape-via-array-filter"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-200"
        ],
        "cna_assigner": "VulnCheck",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/100xxx/CVE-2026-100668.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-100668",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 488647,
  "published_at": "2026-09-26T13:23:33.382+00:00"
}