Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify Grav site with public form
-
DeliveryCraft POST with Twig payload in form field
-
ExploitServer-side template injection evaluates expression
-
ExecutionFull Grav/plugin config returned in response
-
ImpactHarvest 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). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – 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)
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
Affected Packages
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
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
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.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
5DescriptionCVE.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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Related Vulnerabilities in Grav CMS Code Injection and Privilege Escalation
View all 13A Remote Code Execution (RCE) vulnerability in Grav CMS v1.7.48 allows an authenticated admin to upload a malicious plug
Grav is a file-based Web platform. Rated critical severity (CVSS 9.9), this vulnerability is remotely exploitable, low a
GravCMS 1.10.7 allows unauthenticated remote attackers to write arbitrary YAML configuration files, leading to full serv
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
Remote code execution in Grav CMS before 2.0.15 allows attackers holding page-edit or blueprint-config privileges to wri
Vertical privilege escalation in Grav CMS before 2.0.14 lets a delegated administrator holding only the admin.users perm
Stored cross-site scripting in Grav CMS before 2.0.15 lets authenticated editors smuggle JavaScript event handlers past
Server-side request forgery (SSRF) in Grav CMS versions prior to 1.7.49.5 allows remote authenticated attackers to make
Remote code execution in Grav CMS before 2.0.13 allows authenticated low-privilege users to plant and execute arbitrary
EUVD-2025-200076
GHSA-8535-hvm8-2hmv
NVD
CVE.org
EPSS
VulDB
Exploit-DB