Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconObtain or compromise api.media.write API credentials
-
DeliveryCraft upload request with double-extension filename (shell.php.jpg)
-
ExploitSubmit upload to API media endpoint
-
Installpathinfo() returns 'jpg', blocklist bypass succeeds
-
C2File stored in web-accessible media directory
-
ExecuteRequest stored file URL via HTTP
-
ImpactWeb server executes file as PHP, achieving RCE
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V5 - File Handling File type validation, storage isolation
MITRE ATT&CK
2 techniques across 2 tactics: Command and Control, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires two explicit prerequisites: first, the attacker must be authenticated to the Grav API with the api.media.write permission explicitly granted - this is not a default open permission and must be assigned by an administrator; second, the web server must be configured to execute PHP in files where .php appears anywhere in the filename (e.g., Apache AddHandler application/x-httpd-php .php or equivalent mod_php/php-fpm directives that do not restrict to the final extension). Without the web server execution condition, the file is stored but cannot be triggered as code. Exploitation does not require any additional network position, special timing, or user interaction beyond the authenticated upload request. The limiting factors - non-default api.media.write permission assignment and web server PHP multi-extension handling - meaningfully constrain the realistic attacker population compared to the raw network-accessible attack vector. |
| Impact | The official CVSS 4.0 score of 5.3 reflects the PR:L constraint (authenticated access with a specific write permission required) and the conservative impact metrics (VC:L/VI:L), but the RCE tag in the intelligence data suggests the downstream impact can exceed what the score implies if the web server executes multi-extension PHP files. The real-world risk is therefore bifurcated: for installations that both expose the API plugin and run Apache (or equivalent) with AddHandler-style PHP execution on upload directories, this is a meaningful RCE vector for any API user with media write access. For installations where the upload directory is not PHP-executable - or where api.media.write is tightly controlled - exploitation is either blocked or limited to privileged insiders. No EPSS score was provided in the input data. No KEV listing exists, and no confirmed public exploit code is known at time of analysis, meaning active exploitation has not been broadly observed. CVSS signals network accessibility and low attack complexity, making this a priority patch for affected deployments rather than a deferred low-urgency item. |
| Exploit ScenarioDerived | An attacker who holds or has compromised a Grav API account with api.media.write permission sends a multipart file upload request to the API media endpoint with the filename shell.php.jpg. The validateFileExtension() check passes because pathinfo() returns jpg. If the server runs Apache with a global AddHandler for .php files, a subsequent HTTP GET request to the stored file triggers PHP interpretation, executing attacker-controlled code as the web server process user. No public exploit code has been identified at time of analysis, but the technique is a well-known bypass class with no mitigating complexity. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 15, 2026
Remote code execution in the Grav API plugin (getgrav/grav-plugin-api) before 1.0.3 is achievable by authenticated API users holding the api.media.write permission via a double-extension file upload bypass. The HandlesMediaUploads::validateFileExtension() method uses PHP's pathinfo() to inspect only the final file extension, meaning a file named shell.php.jpg passes the dangerous-extension blocklist while retaining a .php segment that certain web server configurations will execute as PHP. No public exploit code or CISA KEV listing has been identified at time of analysis, but the technique is well-understood and exploitation is low-complexity once permission prerequisites are met.
RemediationAI
Upgrade the Grav API plugin to version 1.0.3 or later, which resolves the double-extension bypass by implementing more thorough filename validation. The fix is confirmed by the CVE description specifying 'before 1.0.3' as the affected range. Consult the vendor advisory at https://github.com/getgrav/grav/security/advisories/GHSA-66v2-vxxf-xc3v for upgrade instructions. If immediate upgrade is not feasible, revoke api.media.write permissions from all non-essential API accounts - note this will disable legitimate API-driven media uploads as a side effect. As a defence-in-depth measure independent of the plugin fix, configure the web server to disable PHP execution within the Grav media/user upload directory (e.g., Apache: place a .htaccess with 'php_flag engine off' or a Directory block with 'RemoveHandler .php' in the uploads path); this prevents execution of uploaded files even if bypass is achieved, though it does not fix the underlying flaw.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability is rooted in CWE-434 (Unrestricted Upload of File with Dangerous Type) within the Grav flat-file CMS API plugin. The specific flaw is in HandlesMediaUploads::validateFileExtension(), which calls PHP's pathinfo($filename, PATHINFO_EXTENSION) - a function that returns only the substring after the final dot. A filename like shell.php.jpg therefore returns jpg, which is not on the blocklist, allowing the upload to proceed. The danger is realized when the web server is configured to treat any file whose name contains .php as executable PHP (a behavior historically common with Apache mod_php AddHandler directives). Affected software is identified by CPE cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:* covering all Grav installations with the API plugin prior to version 1.0.3. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N) confirms network-reachable exploitation requiring low privilege and no user interaction.
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:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
Network-accessible upload requires only api.media.write privilege; scope changes because PHP execution extends impact to OS level beyond the application.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
The Grav API plugin (getgrav/grav-plugin-api) before 1.0.3 contains a file upload extension bypass in the API media controller. HandlesMediaUploads::validateFileExtension() inspects only the final file extension via pathinfo($filename, PATHINFO_EXTENSION), so a user with api.media.write permission can upload a file with a double extension such as shell.php.jpg to bypass the dangerous extensions blocklist. The web server may then execute the file as PHP, resulting in remote code execution.
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
Malicious file upload attacks exploit insufficient validation when web applications accept user-provided files.
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-44651
GHSA-7wcr-m737-mchr
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB