Skip to main content

Grav CMS CVE-2026-42610

MEDIUM
Incorrect Authorization (CWE-863)
2026-05-05 https://github.com/getgrav/grav GHSA-3f29-pqwf-v4j4
6.5
CVSS 3.1 · Vendor: https://github.com/getgrav/grav
View

Attack ChainAIDerived

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

  1. Recon
    Obtain low-privileged account (content editor)
  2. Delivery
    Log into admin panel
  3. Exploit
    Edit page and enable Twig processing
  4. Install
    Inject `grav['accounts']` payload into page content
  5. C2
    Save page
  6. Execute
    View rendered page
  7. Impact
    Extract password hash and security salt
  8. Step 8
    Offline 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 admin.login and pages.update permissions (low-privileged content editor role or equivalent); (2) Twig template processing enabled on at least one page via process: twig: true in page frontmatter or site-wide configuration; (3) permission to edit and save page content (create, update, or list pages). No advanced configuration is required - default Grav installations with a content editor user role and Twig processing enabled are exploitable. Exploitation does NOT require administrator or super-admin privileges, does NOT require authentication bypass, and does NOT require the attacker to have direct file system access. The Twig template injection is visible to any user (authenticated or unauthenticated) who views the affected page, making the extracted hashes public. The vulnerability is not limited to specific deployment modes or edge cases; it affects any Grav instance where low-privileged users can edit pages with Twig processing active.

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 {{ grav['accounts'].load('admin').get('hashed_password') }} into the page content. Upon saving and viewing the page, the rendered output displays the super-administrator's Bcrypt hash and security salt in plaintext. The attacker exfiltrates these values and launches an offline brute-force attack using Hashcat or similar tools; depending on password entropy, the hash may be cracked within hours to days, yielding the administrator's credentials for lateral privilege escalation.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – 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

composer getgrav/grav fix: 2.0.0-beta.2

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

Vendor (https://github.com/getgrav/grav) PRIMARY 6.5 MEDIUM
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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

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

  1. 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.
  2. Login to the Admin panel using editor_chen. Navigate to Pages and edit the Home page.
  3. Under the Advanced tab, ensure Process Twig is enabled .
  4. In the Content tab, inject the following Twig payload designed to bypass the isDangerousFunction filter 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" />

  1. 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:

Threat Intelligence Overview

EPSS Score
0.0%
Top 93% exploitable
Threat Intel
1
1 source
Data Quality
4 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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

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

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

pkg:composer/getgrav_grav

More in PHP

View all
CVE-2019-11043 CRITICAL POC
9.8 Oct 28

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

CVE-2012-1823 CRITICAL POC
9.8 May 11

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

CVE-2016-1555 CRITICAL POC
9.8 Apr 21

(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear

CVE-2018-11138 CRITICAL POC
9.8 May 31

The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by

CVE-2024-11680 CRITICAL POC
9.8 Nov 26

ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C

CVE-2025-49113 CRITICAL POC
9.9 Jun 02

Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au

CVE-2017-9841 CRITICAL POC
9.8 Jun 27

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

CVE-2025-0108 HIGH POC
8.8 Feb 12

Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers

CVE-2021-25298 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2021-25296 HIGH POC
8.8 Feb 15

Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re

CVE-2013-4983 CRITICAL POC
10.0 Sep 10

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

CVE-2023-6553 CRITICAL POC
9.8 Dec 15

The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1

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