Skip to main content

Grav API Plugin EUVDEUVD-2026-42265

| CVE-2026-58654 MEDIUM
Unrestricted Upload of File with Dangerous Type (CWE-434)
2026-07-08 disclosure@vulncheck.com GHSA-w3xr-jx24-vw2h
5.3
CVSS 4.0 · Vendor: vulncheck
View

Attack ChainAIDerived

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

  1. Access
    Obtain low-privilege Grav account
  2. Delivery
    POST PHP/SVG payload with forged image/ MIME type to /api/v1/users/user/avatar
  3. Exploit
    Malicious file written to predictable path on disk
  4. Execution
    Identify or exploit absent/ineffective .htaccess protection (nginx, misconfigured Apache)
  5. Persist
    Directly request stored file path via HTTP
  6. Impact
    Execute arbitrary code as web server process

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

Authentication is required at low-privilege level (PR:L in the CVSS 4.0 vector), meaning the attacker must hold any valid user account on the Grav instance - there is no guest or anonymous upload path. The grav-plugin-api plugin must be installed and the /api/v1/users/user/avatar endpoint must be reachable over the network. Immediate RCE is NOT achievable under a correctly configured Apache stack where .htaccess is enforced (AllowOverride FileInfo or All), as direct HTTP access returns 403; exploitation for RCE additionally requires one of: (a) the web server is nginx or IIS where .htaccess is not processed, (b) Apache is configured with AllowOverride None disabling the protective .htaccess, or (c) a separate path traversal vulnerability allows indirect execution of the stored file. Stored XSS via SVG payloads similarly requires a rendering context where the avatar file is served inline to other users' browsers. The base file-write primitive requires only the authenticated upload step.

Impact

The CVSS 4.0 base score of 5.3 (AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N) correctly reflects the constrained standalone impact: the vulnerability requires a low-privileged authenticated session and the .htaccess barrier caps the immediate integrity impact to 'Low' with no confirmed confidentiality or availability consequence. However, the analyst tags (RCE, XSS, Path Traversal) signal that the real risk profile is conditional and potentially much higher if chained: a co-located path traversal bug, a non-Apache web server, or AllowOverride permitting .htaccess override would escalate this to critical RCE. No EPSS data was provided in the intelligence feed, and there is no CISA KEV listing, suggesting no confirmed active exploitation at time of analysis. The risk is therefore best characterized as: low-to-medium in isolation on a correctly configured Apache stack, but a credible stepping-stone in multi-stage attacks against Grav instances running under nginx or with weakened .htaccess enforcement. Defenders should treat the file-persistence aspect as a latent threat that warrants patching even in the absence of immediate exploitability.

Exploit ScenarioDerived

An attacker with a low-privileged account on a Grav CMS instance with the API plugin enabled sends a multipart POST to /api/v1/users/user/avatar with the Content-Type header set to 'image/jpeg' while the uploaded file body contains valid PHP code (e.g., a webshell). The server accepts and stores the file as user/accounts/avatars/[username].php. If the target instance runs nginx rather than Apache - where .htaccess rules have no effect - the attacker directly requests the stored path and achieves unauthenticated remote code execution as the web server process. No public proof-of-concept code has been identified at time of analysis, but the technique is well-documented for CWE-434 class vulnerabilities.

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

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

Alert me

AnalysisAIv1 – Jul 08, 2026

Unrestricted file upload in Grav API Plugin 1.0.0 allows authenticated users to store arbitrary content - including PHP scripts, SVG with embedded JavaScript, and polyglot payloads - via the avatar upload endpoint by supplying a forged client-declared MIME type beginning with 'image/'. The endpoint performs no server-side content inspection and imposes no extension restriction, so malicious files are written to user/accounts/avatars/ with predictable filenames. Immediate exploitation is partially mitigated by an .htaccess rule that returns HTTP 403 on direct access, but the files persist on disk and represent a latent RCE or stored XSS vector if a co-resident path traversal flaw or server misconfiguration bypasses that control. No public exploit code or CISA KEV listing has been identified at time of analysis.

RemediationAI

Upgrade grav-plugin-api to version 1.0.1, which is confirmed as the vendor-released fix per the GitHub security advisory at https://github.com/getgrav/grav/security/advisories/GHSA-xc64-vh46-vph6 and the VulnCheck advisory at https://www.vulncheck.com/advisories/grav-arbitrary-file-upload-via-avatar-endpoint. If immediate upgrade is not possible, restrict access to the /api/v1/users/ endpoint via web server ACLs or a WAF rule requiring that only trusted IP ranges can reach avatar upload paths - note this blocks legitimate API consumers and must be coordinated with application owners. As an additional defensive layer, ensure the .htaccess file under user/accounts/avatars/ is enforced (Apache with AllowOverride All or AllowOverride FileInfo) and audit the web server type: if running nginx or IIS, the .htaccess protection is inert and the risk profile escalates significantly, making immediate patching mandatory. Periodic scanning of user/accounts/avatars/ for non-image file extensions (e.g., .php, .phtml, .svg containing script tags) can detect prior exploitation attempts.

Affected VersionsENISA

grav 0 <1.0.1

Affected Packages

euvd grav fix: 1.0.1

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

Grav is a PHP-based flat-file CMS; grav-plugin-api extends it with a RESTful API layer. The avatar upload handler at /api/v1/users/user/avatar relies exclusively on PHP's getClientMediaType() - a function that reads the Content-Type header supplied by the HTTP client - to gate file acceptance. Because this check is fully attacker-controlled and does not invoke server-side magic-byte inspection (e.g., finfo_file or getimagesize()), any file type can be submitted as long as the declared type starts with 'image/'. CWE-434 (Unrestricted Upload of File with Dangerous Type) precisely describes this root cause: the system trusts the client's self-reported MIME type rather than verifying actual file content. The stored path under user/accounts/avatars/ is predictable by convention, and filenames are derived from the username, making post-upload file location trivial to determine. The .htaccess defense is an Apache-specific control that fails silently under nginx, IIS, or any permissive Apache AllowOverride configuration.

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 (vulncheck) PRIMARY 5.3 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 4.3 MEDIUM

Network-reachable endpoint (AV:N), low complexity upload (AC:L), requires authenticated low-privilege user (PR:L); integrity impact is Low given .htaccess blocking; no confidentiality or availability impact from the upload primitive alone.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/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
None
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 08, 2026 - 15:01 EUVD

DescriptionCVE.org

The Grav API plugin (getgrav/grav-plugin-api) 1.0.0 contains an unrestricted file upload vulnerability in the avatar upload endpoint (/api/v1/users/user/avatar). The endpoint validates only the client-declared MIME type (getClientMediaType) beginning with 'image/' and does not inspect the actual file content or restrict the resulting extension, allowing an authenticated user to store arbitrary content - including PHP code, SVG with embedded JavaScript, and polyglot payloads - under user/accounts/avatars/ with predictable filenames. Direct HTTP access to the stored files is blocked by .htaccess (returns 403), but the files persist on disk and could lead to remote code execution or stored XSS in the presence of a path traversal flaw or server misconfiguration. Fixed in 1.0.1.

Threat Intelligence Overview

EPSS Score
0.3%
Top 83% exploitable
Prevalence
Low
niche flat-file PHP CMS with optional API plugin
Data Quality
5 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.3%
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
Partial

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

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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