Skip to main content

Grav API Plugin CVE-2026-61457

| EUVDEUVD-2026-44651 MEDIUM
Unrestricted Upload of File with Dangerous Type (CWE-434)
2026-07-15 VulnCheck GHSA-7wcr-m737-mchr
5.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Recon
    Obtain or compromise api.media.write API credentials
  2. Delivery
    Craft upload request with double-extension filename (shell.php.jpg)
  3. Exploit
    Submit upload to API media endpoint
  4. Install
    pathinfo() returns 'jpg', blocklist bypass succeeds
  5. C2
    File stored in web-accessible media directory
  6. Execute
    Request stored file URL via HTTP
  7. Impact
    Web 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.

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

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

Alert me

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

grav 0 <1.0.3

Affected Packages

euvd grav fix: 1.0.3

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

Vendor (VulnCheck) PRIMARY 5.3 MEDIUM
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
vuln.today AI 9.9 CRITICAL

Network-accessible upload requires only api.media.write privilege; scope changes because PHP execution extends impact to OS level beyond the application.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Jul 15, 2026 - 13:03 EUVD

DescriptionCVE.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

EPSS Score
0.5%
Top 63% exploitable
Prevalence
Low
niche flat-file CMS with optional API plugin add-on
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

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.5%
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
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Total

Priority Score

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

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.

More in Grav

View all
CVE-2025-66294 HIGH POC
8.7 Dec 01

Server-side template injection (SSTI) in Grav (getgrav/grav) prior to 1.8.0-beta.27 allows an authenticated attacker hol

CVE-2025-66301 HIGH POC
8.6 Dec 01

Broken access control in Grav CMS (CWE-285) before 1.8.0-beta.27 lets an authenticated editor-level user escalate their

CVE-2025-50286 HIGH POC
8.1 Aug 06

A Remote Code Execution (RCE) vulnerability in Grav CMS v1.7.48 allows an authenticated admin to upload a malicious plug

CVE-2024-34082 CRITICAL POC
9.9 May 15

Grav is a file-based Web platform. Rated critical severity (CVSS 9.9), this vulnerability is remotely exploitable, low a

CVE-2021-47812 CRITICAL POC
9.8 Jan 16

GravCMS 1.10.7 allows unauthenticated remote attackers to write arbitrary YAML configuration files, leading to full serv

CVE-2026-65008 CRITICAL POC
9.3 Jul 21

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

CVE-2026-75827 CRITICAL POC
9.3 Aug 18

Remote code execution in Grav CMS before 2.0.15 allows attackers holding page-edit or blueprint-config privileges to wri

CVE-2026-75837 CRITICAL POC
9.3 Aug 18

Vertical privilege escalation in Grav CMS before 2.0.14 lets a delegated administrator holding only the admin.users perm

CVE-2026-75828 CRITICAL POC
9.3 Aug 18

Stored cross-site scripting in Grav CMS before 2.0.15 lets authenticated editors smuggle JavaScript event handlers past

CVE-2025-66844 CRITICAL POC
9.1 Dec 15

Server-side request forgery (SSRF) in Grav CMS versions prior to 1.7.49.5 allows remote authenticated attackers to make

CVE-2025-66299 HIGH POC
8.8 Dec 01

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

CVE-2026-72819 HIGH POC
8.7 Aug 14

Remote code execution in Grav CMS before 2.0.13 allows authenticated low-privilege users to plant and execute arbitrary

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