Grav CMS CVE-2026-42610
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconObtain low-privileged account (content editor)
-
DeliveryLog into admin panel
-
ExploitEdit page and enable Twig processing
-
InstallInject `grav['accounts']` payload into page content
-
C2Save page
-
ExecuteView rendered page
-
ImpactExtract password hash and security salt
-
Step 8Offline brute-force Bcrypt hash with Hashcat
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization logic validation
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires ALL of the following: (1) valid user account with |
| Impact | CVSS 6.5 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N) indicates moderate but real risk: network-accessible, low complexity, requires low privilege (content editor role), no user interaction, and confidentiality impact. EPSS score not provided in input, preventing probabilistic exploitation calibration. However, exploitation conditions are highly concrete and well-documented: attacker must hold a valid low-privileged account with pages.update permission and Twig processing must be enabled on at least one page (both default or common configurations). The attack does not require social engineering, interaction from other users, or timing windows - a single malicious page save discloses hashes permanently until removal. The extracted Bcrypt hashes are valuable for offline brute-force (depending on password strength and computing resources), and the security salt enables CSRF token forgery and session hijacking if sessions are not additionally protected. No KEV (CISA Known Exploited Vulnerabilities) confirmation is provided in the input, but a video proof-of-concept demonstrating live extraction is documented in the GitHub advisory, confirming practical exploitability. The vulnerability persists despite prior patching attempts, indicating a fundamental architectural issue with the Twig sandbox design. Organizations running 1.8.0-beta.x with untrusted content editors face elevated risk. |
| Exploit ScenarioDerived | An organization grants a content editor (e.g., 'editor_chen' account) permission to create and update pages but denies access to user management and configuration. The editor navigates to the home page, enables Twig processing in the Advanced tab, and injects the payload |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 05, 2026
Sensitive information disclosure in Grav CMS v1.8.0-beta.29 allows low-privileged users with page editing permissions to bypass Twig sandbox restrictions and extract administrative password hashes and security salts via the exposed grav['accounts'] service. A content editor can inject a Twig template with {{ grav['accounts'].load('admin').get('hashed_password') }} to retrieve plaintext Bcrypt hashes accessible for offline brute-force attack. Vendor-released patch available (2.0.0-beta.2 and commit c66dfeb5ff679a1667678c6335eb9ff3255dfc47); publicly available proof-of-concept exists demonstrating practical exploitation.
RemediationAI
Vendor-released patch: upgrade to Grav 2.0.0-beta.2 or apply commit c66dfeb5ff679a1667678c6335eb9ff3255dfc47 directly (https://github.com/getgrav/grav/commit/c66dfeb5ff679a1667678c6335eb9ff3255dfc47). The fix relocates the HMAC key from user/config/security.yaml to user/config/security-private.php (protected by .htaccess), removes the salt from the Config object, and blocks UserCollection::load from the Twig function allowlist. For 1.8.x beta users unable to upgrade immediately, apply compensating controls: disable Twig processing on all user-editable pages by setting process: twig: false in page frontmatter or via site-wide config (system.pages.process: [markdown] only, excluding twig), restrict page editing permissions to trusted administrators only, or implement a Web Application Firewall rule blocking Twig syntax (e.g., {{ and }}) from page content submissions. Note that disabling Twig globally may break legitimate template features; coordinate with content editors. No partial patch is available for 1.8.x - remediation requires either full upgrade or policy-level access control.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in composer
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability stems from inadequate Twig sandbox isolation in Grav's template processing engine. Despite prior security patches in v1.8.0-beta.27/28 that added a isDangerousFunction filter to restrict access to sensitive objects, the grav['accounts'] service remained accessible from within Twig templates with process: twig: true enabled. The Accounts Service exposes a load() method allowing retrieval of user objects, and the grav.config object exposes the security.salt parameter used for CSRF nonce generation and session handling. The root cause is CWE-863 (Incorrect Authorization), compounded by inadequate whitelisting in the Twig sandbox implementation. The fix in Grav 2.0.0-beta.2 migrates the HMAC key from the web-accessible security.yaml Config tree into a security-private.php file blocked by .htaccess, and adds the UserCollection::load method to the Twig function blocklist. CPE identifies the affected package as pkg:composer/getgrav/grav versions below 2.0.0-beta.2.
Know when PHP 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
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Primary rating from Vendor (https://github.com/getgrav/grav) · only source for this CVE.
CVSS VectorVendor: https://github.com/getgrav/grav
DescriptionCVE.org
Summary
Information disclosure exists in Grav CMS v1.8.0-beta.29. Despite previous security patches (notably in v1.8.0-beta.27/28) aimed at restricting sensitive object access within the Twig environment, the Accounts Service remains exposed.
A low-privileged user (EX: Content Editor with only pages.update permissions) can bypass the existing Twig sandbox restrictions by utilizing the grav['accounts'] service. Attacker can programmatically load administrative user objects and extract sensitive data, including Bcrypt password hashes and the security salt.
Affected version
Grav CMS: v1.8.0-beta.29 (and earlier 1.8.x beta versions).
Note: This vulnerability persists even after the vendor attempted to mitigate similar SSTI vectors in earlier beta releases.
Steps to Reproduce
- Create a low-privileged account (MY CASE IS 'editor_chen') with permissions limited to admin.login and basic page management (create, update, list). Ensure all administrative permissions (Configuration, User Accounts, ...) are explicitly Denied.
- Login to the Admin panel using
editor_chen. Navigate to Pages and edit theHomepage. - Under the Advanced tab, ensure Process Twig is enabled .
- In the Content tab, inject the following Twig payload designed to bypass the
isDangerousFunctionfilter by accessing the internal service container:
---
title: Information Disclosure Test
process:
twig: true
---
# Security Audit Results
- Admin Password Hash: {{ grav['accounts'].load('admin').get('hashed_password') }}
- Security Salt: {{ grav.config.get('security.salt') }}<img width="1176" height="618" alt="GRAV" src="https://github.com/user-attachments/assets/7970216a-2dc6-4d1b-8dfd-b64f3712c9c5" />
- Click Save. And navigate to the public page (
http://localhost:8000/home). Page will render and display the administrator's Bcrypt hash and the system security salt.
<img width="1278" height="462" alt="GRAV2" src="https://github.com/user-attachments/assets/33b7b894-6ae3-4d29-bd2d-8004e9b343e0" />
PoC
---
title: Information Disclosure Test
process:
twig: true
---
# Security Audit Results
- Admin Password Hash: {{ grav['accounts'].load('admin').get('hashed_password') }}
- Security Salt: {{ grav.config.get('security.salt') }}Impact
Attackers can obtain the password hashes of all registered users, including Super Administrators.
Extracted hashes can be subjected to offline brute-force or dictionary attacks (EX: USE Hashcat)
Video
Pls refer to the attached video <video src="https://github.com/user-attachments/assets/74d5ae41-7911-4099-b2cc-e6c51b27c68c" controls="controls" style="max-width: 100%;"> </video>
---
Maintainer note - fix applied (2026-04-24)
Fixed in Grav core on the 2.0 branch: commit d904efc33 - will ship in 2.0.0-beta.2.
What changed: the HMAC key formerly stored as security.salt in user/config/security.yaml has moved out of the Config tree into user/config/security-private.php. On upgrade, the existing salt value is migrated into the new file on first request (preserving CSRF nonces and sessions) and the key is scrubbed from both the live Config object and the on-disk YAML - so {{ grav.config.get('security.salt') }} from a sandboxed Twig template now returns null. The .php extension is blocked from web access by the default user/*.php htaccess rule; the file contains only a return statement, so direct PHP exec produces no output either.
The PoC's password-hash half (grav['accounts'].load('admin').get('hashed_password')) was already covered by the new Twig content sandbox in 2.0.0-beta.2 - UserCollection::load is not in the sandbox allowlist - see the separate GHSA-58hj-46fw-rcfm advisory.
Files:
system/src/Grav/Common/Security.php- newSecurity::getNonceKey()+ migration.system/src/Grav/Common/Utils.php-generateNonceStringnow uses the new key.system/src/Grav/Common/Service/SessionServiceProvider.php.system/src/Grav/Common/Config/Setup.php- removed auto-gen ofsecurity.salt.system/config/security.yaml- removed placeholdersalt:.tests/unit/Grav/Common/Security/NonceKeySecurityTest.php- migration + generation coverage.
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
Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
Affected Products (CPE)CVE.org
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
GHSA-3f29-pqwf-v4j4
NVD
CVE.org
EPSS
Exploit-DB