CVE-2026-130741

Grav 2.0.0 before 2.2.18 Arbitrary File Read via Twig Sandbox Bypass

Published Nov 18, 2026 CVSS 4.0 · 8.7 High EPSS n/a KEV · Not listed
Description
Grav from 2.0.0 before 2.2.18 contains a Twig sandbox bypass vulnerability that allows publishers to read any server file by abusing allowlisted array_key_value() and page accessor setters such as filePath(). Attackers can repoint page objects or overwrite the assets collections to render private keys and the API signing secret, then forge a super-admin API token.

Analysis

AI-generated

Technical impact

Grav CMS versions before 2.2.18 contain a Twig sandbox bypass that lets authenticated publishers read arbitrary files on the server. By abusing the array_key_value() function and page accessor setters such as filePath(), an attacker can redirect page objects or overwrite assets collections to expose private keys and the API signing secret. Those credentials enable forging a super‑admin API token, creating a privilege escalation path.

Affected Systems

The vulnerability is present in Grav CMS released 2.0.0 through 2.2.17. Connected to the getgrav:grav product. Users running any of those releases on their sites are vulnerable. Administrators of Grav installations should verify their version and consider upgrading.

Risk and Exploitability

The CVSS score of 8.7 reflects high severity. EPSS is not reported at this time, and the flaw is not listed in CISA's KEV catalog, so the public exploitation likelihood may be limited but still significant. Attackers would need publisher or higher‑level credentials to trigger the sandbox bypass. The most probable attack path is an attacker with publish permissions manipulating page object properties to leak internal files and then using the extracted keys to forge an administrative token. Until a patch is applied, the system faces a medium‑high risk of confidentiality breach and potential privilege escalation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Grav CMS to version 2.2.18 or later to incorporate the Twig sandbox fix.
  • If an immediate upgrade is not feasible, restrict publisher role permissions to prevent access to page accessor setters and asset collections that may expose sensitive files.
  • Adjust the Twig sandbox configuration to block the array_key_value() function and any page accessor functions that can be abused, or define a narrower allowlist that excludes vulnerable functions.

Generated by OpenCVE AI on November 18, 2026 at 19:32 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description Grav from 2.0.0 before 2.2.18 contains a Twig sandbox bypass vulnerability that allows publishers to read any server file by abusing allowlisted array_key_value() and page accessor setters such as filePath(). Attackers can repoint page objects or overwrite the assets collections to render private keys and the API signing secret, then forge a super-admin API token.
Title Grav 2.0.0 before 2.2.18 Arbitrary File Read via Twig Sandbox Bypass
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': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

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

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 18, 2026, 11:34 AM
Reserved
Nov 17, 2026, 3:40 PM
Status
Deferred
Published
Nov 18, 2026, 12:17 PM
Modified
Nov 18, 2026, 12:17 PM