Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach Grav endpoint or admin panel
-
DeliveryDeliver crafted serialized object or malicious plugin parameters
-
ExploitTrigger unsafe unserialize() or unescaped git clone
-
ExecutionExecute gadget chain or injected OS command
-
ImpactRun arbitrary code as web service user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The OS command-injection path requires authenticated administrator access to the plugin/theme installation feature and exploits unescaped branch, url, and path parameters passed into the git clone shell command - admin privilege is the explicit limiting factor. The PHP object-injection paths require that the attacker controls the serialized input reaching one of three specific unserialize() sinks (Scheduler\JobQueue, Framework\Cache\Adapter\FileCache, or Session) AND that a usable gadget chain exists in the loaded class set; reachability of these sinks by an unauthenticated remote attacker is not detailed in the source data and should be validated per deployment. The Twig SSTI path requires the ability to inject template expressions that traverse the bypassed security blocklist. Limiting factors across vectors: admin authentication for command injection, attacker control over serialized bytes for deserialization, and template-input access for SSTI - meaning the published PR:N (unauthenticated) rating applies only to the most favorable vector, not all three. |
| Impact | The published CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H, score 9.3) represents the worst-case blended rating across the three flaw classes and implies remote, unauthenticated, full-impact code execution, but the individual vectors differ in real prerequisites and that nuance matters for prioritization. The command-injection path explicitly requires admin access (PR would realistically be High for that vector alone), and the deserialization paths require that an attacker actually controls the serialized bytes fed to unserialize() - feasible for Session/FileCache only where that data is influenceable, and a working public gadget chain is not documented in the provided data. EPSS and SSVC data were not supplied, and the vulnerability is not in CISA KEV, so there is no signal of active or automatable mass exploitation. Net assessment: a genuinely serious, patch-now bug for internet-facing Grav installs given RCE potential and a reputable reporter (VulnCheck), but the PR:N rating likely reflects the deserialization vector's best case rather than uniform unauthenticated reachability - verify which path is exploitable in your deployment. Conflict to note: the assigned CWE-78 covers only the command-injection issue, while the highest-severity behavior is object-injection deserialization (CWE-502), so the single CWE understates the bug's true breadth. |
| Exploit ScenarioDerived | An attacker who can place or influence serialized data consumed by Grav's Session or FileCache supplies a crafted PHP object payload; when Grav calls unserialize() without class restrictions, a magic-method gadget chain executes and yields arbitrary PHP code on the server. Alternatively, a malicious or compromised administrator installs a plugin/theme whose branch, url, or path field contains shell metacharacters, causing the unescaped git clone command to execute attacker-chosen OS commands. No public exploit or gadget chain is documented in the available data, so weaponization effort is presently unverified. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 30, 2026
Arbitrary code execution in Grav CMS before 2.0.0-beta.2 stems from three distinct flaw classes: PHP object injection via unsafe unserialize() of attacker-controllable data in the Scheduler JobQueue, FileCache adapter, and Session components, an OS command injection in the plugin/theme InstallCommand git clone routine, and a Twig sandbox blocklist bypass enabling server-side template injection. An attacker who can influence the serialized input can chain available gadgets to run arbitrary PHP, while the command-injection path is reachable by authenticated administrators through plugin/theme installation. No public exploit identified at time of analysis; the issues were privately reported by VulnCheck and are fixed in 2.0.0-beta.2.
RemediationAI
Upgrade to the fixed release - Vendor-released patch: 2.0.0-beta.2 - which addresses all three flaw classes; this is the primary and recommended remediation, documented in the vendor advisory GHSA-vj3m-2g9h-vm4p (https://github.com/getgrav/grav/security/advisories/GHSA-vj3m-2g9h-vm4p). Because the fixed version is a beta, organizations on stable channels should review release notes and test before deploying, and if immediate upgrade is not possible apply compensating controls per vector: restrict and audit administrator accounts and avoid installing untrusted plugins/themes to blunt the InstallCommand OS command injection (trade-off: limits legitimate admin self-service installs); place the admin panel and any session/cache-writing endpoints behind a VPN, IP allowlist, or reverse-proxy authentication to reduce who can influence serialized data (trade-off: hampers remote administration); and disable or tightly review any feature allowing user-supplied Twig templates to mitigate the SSTI blocklist bypass (trade-off: breaks templates that legitimately accept dynamic expressions). Ensure session and cache storage directories are not writable by untrusted users and rotate session secrets after patching. Consult the VulnCheck advisory (https://www.vulncheck.com/advisories/grav-multiple-remote-code-execution-vulnerabilities-via-unsafe-unserialize-and-command-injection) for vector-specific detail.
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
Grav is a PHP-based flat-file CMS that uses no database, relying on filesystem caches, sessions, and YAML/Twig for templating. The core weakness in the deserialization vector is CWE-502-style PHP Object Injection: unserialize() is called on untrusted data without an allowed_classes allowlist in Scheduler\JobQueue, Framework\Cache\Adapter\FileCache, and Session, so a magic-method (__wakeup/__destruct) gadget chain present in Grav's dependency tree can be triggered to reach code execution. The CWE assigned (CWE-78, OS Command Injection) maps to the InstallCommand path, where the branch, url, and path parameters of a git clone are concatenated into a shell command without escapeshellarg-style escaping, letting shell metacharacters break out into arbitrary OS commands. The third issue is server-side template injection through a bypass of Grav's Twig security blocklist, which is meant to sandbox user-supplied template expressions. The CPE cpe:2.3:a:grav:grav:*:*:*:*:*:*:*:* confirms the Grav application itself (all versions prior to the fix) is the affected product.
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:H/VA:H/SC:N/SI:N/SA:N
Network-reachable but the dominant credible paths need attacker-controlled serialized input plus a gadget chain (AC:H) or authenticated access (PR:L); successful exploitation yields full RCE, so C/I/A High.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
Grav CMS before 2.0.0-beta.2 contains multiple code-execution vulnerabilities. Three unsafe unserialize() calls - in Scheduler\JobQueue, Framework\Cache\Adapter\FileCache, and Session - deserialize untrusted data without restricting allowed classes, enabling PHP object injection and, via a gadget chain, arbitrary code execution where an attacker controls the serialized input. Additionally, InstallCommand's git clone operation passes the branch, url, and path parameters into a shell command without escaping, allowing OS command injection via plugin/theme installation (which requires admin access). A Twig security blocklist bypass (server-side template injection) is also present. The issues are fixed in 2.0.0-beta.2.
Articles & Coverage 1
Executive ViewAI
Grav CMS versions before 2.0.0-beta.2 contain critical arbitrary code execution vulnerabilities through multiple pathways: unauthenticated PHP object injection via unsafe deserialization in core components (Scheduler, FileCache, Session), authenticated command injection in plugin/theme installation, and Twig template sandbox bypass. Organizations using affected Grav deployments face complete system compromise, data exfiltration, and operational disruption from attackers who can execute arbitrary code with application-level privileges. Immediate patching is essential given the critical CVSS 9.3 score and dual exploitation pathways.
Apply vendor patch: upgrade to Grav CMS version 2.0.0-beta.2 or later.
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
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Server-side template injection (SSTI) in Grav (getgrav/grav) prior to 1.8.0-beta.27 allows an authenticated attacker hol
Broken access control in Grav CMS (CWE-285) before 1.8.0-beta.27 lets an authenticated editor-level user escalate their
A 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
Grav is a file-based Web platform. Prior to 1.8.0-beta.27, Grav CMS is vulnerable to a Server-Side Template Injection (S
Remote code execution in Grav CMS before 2.0.13 allows authenticated low-privilege users to plant and execute arbitrary
EUVD-2026-40452
GHSA-58cg-x8gx-6hg3
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB