CVE-2026-130744

Grav 2.0.0 before 2.2.18 RCE via Host Header Environment Folder

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 remote code execution vulnerability that allows page editors to escape the Twig sandbox by sending requests with a Host: pages header. Attackers can write configuration YAML through page folders and media .meta.yaml sidecars to register an unsandboxed Twig namespace and run shell commands as the web server user.

Analysis

AI-generated

Technical impact

Grav versions 2.0.0 up to 2.2.18 contain a flaw that allows a page editor to escape the Twig sandbox by sending a request with a Host header of 'pages'. This vulnerability enables the attacker to write configuration YAML files in page folders and media .meta.yaml sidecars, register an unsandboxed Twig namespace, and execute arbitrary shell commands as the web server user. The weakness is identified as CWE‑15, an Improper Access Control issue, and the impact is the ability to run code on the server. The description does not explicitly state whether authentication is required, but the requirement for page editor privileges is implied.

Affected Systems

The affected system is Grav, released under the getgrav:grav vendor. Versions 2.0.0 through any release prior to 2.2.18 are vulnerable. No specific patch versions are listed beyond the latest 2.2.18. The vulnerability affects all deployments of these versions, regardless of operating system, as it is a server‑side issue within Grav's processing of HTTP requests.

Risk and Exploitability

The CVSS score of 8.7 indicates high severity. The EPSS score is not available, so the current probability of exploitation is unknown, and the vulnerability is not listed in CISA KEV, suggesting it is not a known, actively exploited weakness. The likely attack vector is a remote HTTP request with a crafted Host header, meaning the vulnerability can be triggered by any user who can send such a request to the Grav instance, including unauthenticated users with access to the web server. Because the flaw grants the ability to run arbitrary shell commands, the risk is significant, making immediate remediation prudent.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Grav to version 2.2.18 or later to eliminate the remote code execution flaw.
  • After updating, verify that all configuration files in content folders have not been replaced with malicious YAML that could re‑register unsandboxed Twig namespaces.
  • If a temporary fix is required before upgrading, strictly limit the Host header values accepted by the web server to known domain names and disallow the 'pages' value, thereby preventing the exploit path.

Generated by OpenCVE AI on November 18, 2026 at 19:50 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': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Grav from 2.0.0 before 2.2.18 contains a remote code execution vulnerability that allows page editors to escape the Twig sandbox by sending requests with a Host: pages header. Attackers can write configuration YAML through page folders and media .meta.yaml sidecars to register an unsandboxed Twig namespace and run shell commands as the web server user.
Title Grav 2.0.0 before 2.2.18 RCE via Host Header Environment Folder
First Time appeared Getgrav
Getgrav grav
Weaknesses CWE-15
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-15

    External Control of System or Configuration Setting

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 18, 2026, 1:25 PM
Reserved
Nov 17, 2026, 3:40 PM
Status
Deferred
Published
Nov 18, 2026, 12:17 PM
Modified
Nov 18, 2026, 2:17 PM