Skip to main content

Grav CMS EUVDEUVD-2025-200076

| CVE-2025-66298 HIGH
Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336)
2025-12-01 security-advisories@github.com GHSA-8535-hvm8-2hmv
7.7
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify Grav site with public form
  2. Delivery
    Craft POST with Twig payload in form field
  3. Exploit
    Server-side template injection evaluates expression
  4. Execution
    Full Grav/plugin config returned in response
  5. Impact
    Harvest sensitive configuration secrets

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
Exploitation Conditions

Requires that the target Grav site (prior to 1.8.0-beta.27) exposes at least one form handled by the Forms plugin - the PoC uses a POST form with fields including __form-name__ and __unique_form_id__, and injects a Twig expression into a form field. No authentication and no user interaction are needed (PR:N/UI:N), and default configurations with a public form are exploitable. The practical limiting factor is that a reachable form must exist on the site; sites with no public forms are not exposed via this vector. The confirmed impact is disclosure of configuration data returned in the HTTP response.

Impact

This is a genuine, easy-to-exploit information-disclosure flaw but with confidentiality-only impact. The CVSS 4.0 vector (AV:N/AC:L/PR:N/UI:N/VC:H/VI:N/VA:N) indicates a remote, low-complexity, unauthenticated attack against any Grav site that exposes a form, with high confidentiality impact and no integrity/availability impact - consistent with the description of dumping the full configuration via a Server-Side Template Injection payload. Exploitation status: publicly available exploit code exists (a working PoC is published in the GHSA advisory), but there is no CISA KEV listing and EPSS is very low at 0.06% (19th percentile), signaling no evidence of widespread automated exploitation to date. The signals are internally consistent (low complexity + public PoC + unauthenticated) yet the low EPSS and confidentiality-only scope temper the raw 7.7 score: this is a real priority for exposed Grav sites because the barrier to exploitation is minimal and the PoC is trivial to reproduce, but the direct blast radius is disclosure of secrets rather than code execution. Note the underlying weakness is SSTI (CWE-1336); the confirmed impact is config disclosure, but the extensive dangerous-function blocklist added in the patch (exec, eval, file operations, reflection, etc.) implies the template-injection primitive could be leveraged for broader impact including RCE if a suitable gadget exists - the assigned CVSS scores only the confirmed disclosure path.

Exploit ScenarioDerived

An attacker locates any Grav-powered site with a public form and submits a crafted POST request placing a Twig expression such as {{var_dump(_context|slice(0,7))}} into a form field (e.g. __unique_form_id__). The server renders the injected template and returns the full Grav and plugin configuration - potentially including secrets, API keys, and credentials - in the response. A working proof-of-concept is publicly documented in the GitHub Security Advisory (GHSA-8535-hvm8-2hmv).

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Sep 26, 2026

Server-side template injection in Grav CMS (all releases prior to 1.8.0-beta.27, including the 1.7.x line such as 1.7.48) lets an unauthenticated remote attacker dump the site's full configuration - including plugin settings and any secrets they contain - by posting a crafted Twig expression in the __unique_form_id__ parameter of any form rendered by the Forms plugin. The affected code path evaluates attacker-supplied form field values as Twig, and the pre-patch version of Grav shipped no meaningful blocklist for dangerous Twig functions, so the response returns var_dumped configuration data directly to the requester. Impact is confidentiality-only (no integrity or availability effect per the independent assessment) and does not require authentication or user interaction, but a public, Forms-plugin-backed form must exist on the target; publicly available exploit code exists (no confirmed active exploitation / CISA KEV listing), and EPSS is low at roughly 0.06% (19th percentile).

Earlier versions of this analysis (1)
v1 Mar 15, 2026 - 13:34 CVSS 7.5

RemediationAI

Vendor-released patch: upgrade Grav to 1.8.0-beta.27 or later, which is the release that contains commit e37259527d9c1deb6200f8967197a9fa587c6458 hardening system/src/Grav/Common/Security.php (see the advisory at https://github.com/getgrav/grav/security/advisories/GHSA-8535-hvm8-2hmv and the commit diff at https://github.com/getgrav/grav/commit/e37259527d9c1deb6200f8967197a9fa587c6458); because the flaw lives in Grav core, updating the Forms plugin to its latest release while remaining on a pre-beta.27 core does not remediate it, and if upgrading to a 1.8.0 beta is not acceptable for a production site there is no backport listed in the available data, so compensating controls must be used. The most effective compensating control is to remove public exposure of the vulnerable sink: unpublish pages containing Forms-plugin forms, set shortcode processing on those pages to disabled, or deactivate the Forms plugin entirely - this closes the vector but breaks all site contact/registration forms. Where forms must stay online, front the site with a WAF or reverse proxy rule that rejects POST bodies containing Twig delimiters ({{, }}, {% %}) or the pipe/join constructs used in the PoC, particularly in the __form-name__ and __unique_form_id__ fields, accepting that this yields false positives for legitimate Twig-in-form usage; additionally restrict the form-handling endpoint to expected field names via an allowlist, and rotate any credentials, API keys, or plugin secrets stored in Grav configuration since an exploitation already disclosed them to the requester. Monitoring guidance: hunt access logs for POSTs to form endpoints whose __unique_form_id__ or similar hidden fields contain braces, var_dump, _context, or slice( - none of those tokens appear in normal Grav form submissions.

Affected VersionsENISA

grav < 1.8.0-beta.27

Affected Packages

composer getgrav/grav fix: 1.8.0-beta.27
euvd grav fix: 1.8.0-beta.27

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in composer, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine) describes the root cause: Grav's Forms plugin passes user-controlled POST field values into the Twig rendering pipeline, where they are compiled and evaluated as template code rather than treated as inert strings. The advisory PoC demonstrates the classic pattern - supplying {{var_dump(_context|slice(0,7))}} in the __unique_form_id__ field of a form named 'hero-form' - which invokes var_dump on the Twig context and reflects the full Grav configuration array (site config plus every plugin's configuration) back in the HTTP response. Grav is a flat-file PHP CMS built on Twig and Composer (composer/getgrav/grav); the fix in commit e37259527d9c1deb6200f8967197a9fa587c6458 hardens system/src/Grav/Common/Security.php by compiling cached regex patterns that reject dangerous Twig functions (call_user_func, file_get_contents, exec, system, unserialize, reflection classes, XML/DOM and database helpers, registerUndefinedFunctionCallback, setEscaper, etc.), dangerous property/method chains (twig.twig, config.set, grav.scheduler, grav.user.update, _context, _self, cache purge, session setters), bare dangerous function calls outside Twig blocks, and string-concatenation bypasses that assemble forbidden fragments via array joins. The patch therefore treats the class of Twig-sandbox escapes broadly rather than fixing a single sink, which matters because the CPE data lists the entire getgrav:grav product including betas 1 through 17 of the 1.8.0 pre-release series.

Know when Grav gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (github) PRIMARY 7.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:P
vuln.today AI 7.5 HIGH

Remote unauthenticated POST to a public form triggers SSTI with no complexity or interaction; confirmed impact is full config disclosure (C:H) with no integrity or availability effect.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

5
CVSS changed
Sep 26, 2026 - 00:22 NVD
7.5 (HIGH) 7.7 (HIGH)
Patch released
Mar 15, 2026 - 13:34 nvd
Patch available
PoC Detected
Dec 03, 2025 - 15:51 vuln.today
Public exploit code
CVE Published
Dec 01, 2025 - 22:15 cve.org
HIGH 7.7
CVE Published
Dec 01, 2025 - 22:15 nvd
HIGH 7.5

DescriptionCVE.org

Grav is a file-based Web platform. Prior to 1.8.0-beta.27, having a simple form on site can reveal the whole Grav configuration details (including plugin configuration details) by using the correct POST payload to exploit a Server-Side Template (SST) vulnerability. Sensitive information may be contained in the configuration details. This vulnerability is fixed in 1.8.0-beta.27.

Executive ViewAI

Why It Matters

A Server-Side Template injection vulnerability in Grav CMS versions prior to 1.8.0-beta.27 allows attackers to extract sensitive configuration data-including database credentials, API keys, and plugin settings-through simple form submissions. Any organization running vulnerable Grav instances with public-facing forms faces immediate risk of credential compromise and potential lateral movement attacks.

Business Impact: High
Compensating Controls

Apply vendor patch. If immediate patching is not feasible, implement WAF rules to block POST requests containing template injection payloads; disable or require authentication for all public-facing form functionality; apply network segmentation to restrict which systems can access configuration files; and monitor configuration access logs for suspicious activity.

Threat Intelligence Overview

EPSS Score
0.1%
Top 81% exploitable
Prevalence
Medium
popular open-source flat-file PHP CMS, moderate real-world footprint
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

58
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

More in Grav

View all
CVE-2025-50286 HIGH POC
8.1 Aug 06

A Remote Code Execution (RCE) vulnerability in Grav CMS v1.7.48 allows an authenticated admin to upload a malicious plug

CVE-2024-34082 CRITICAL POC
9.9 May 15

Grav is a file-based Web platform. Rated critical severity (CVSS 9.9), this vulnerability is remotely exploitable, low a

CVE-2021-47812 CRITICAL POC
9.8 Jan 16

GravCMS 1.10.7 allows unauthenticated remote attackers to write arbitrary YAML configuration files, leading to full serv

CVE-2026-65008 CRITICAL POC
9.3 Jul 21

Remote code execution in Grav CMS 2.0.4 (fixed in 2.0.7) lets an authenticated user holding the admin.pages or api.pages

CVE-2026-75827 CRITICAL POC
9.3 Aug 18

Remote code execution in Grav CMS before 2.0.15 allows attackers holding page-edit or blueprint-config privileges to wri

CVE-2026-75837 CRITICAL POC
9.3 Aug 18

Vertical privilege escalation in Grav CMS before 2.0.14 lets a delegated administrator holding only the admin.users perm

CVE-2026-75828 CRITICAL POC
9.3 Aug 18

Stored cross-site scripting in Grav CMS before 2.0.15 lets authenticated editors smuggle JavaScript event handlers past

CVE-2025-66844 CRITICAL POC
9.1 Dec 15

Server-side request forgery (SSRF) in Grav CMS versions prior to 1.7.49.5 allows remote authenticated attackers to make

CVE-2026-72819 HIGH POC
8.7 Aug 14

Remote code execution in Grav CMS before 2.0.13 allows authenticated low-privilege users to plant and execute arbitrary

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy