Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain low-privilege Grav account
-
DeliveryPOST PHP/SVG payload with forged image/ MIME type to /api/v1/users/user/avatar
-
ExploitMalicious file written to predictable path on disk
-
ExecutionIdentify or exploit absent/ineffective .htaccess protection (nginx, misconfigured Apache)
-
PersistDirectly request stored file path via HTTP
-
ImpactExecute 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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
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
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
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.
Primary rating from Vendor (vulncheck).
CVSS VectorVendor: vulncheck
Lifecycle Timeline
1DescriptionCVE.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
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
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.
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
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
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
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
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
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
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
EUVD-2026-42265
GHSA-w3xr-jx24-vw2h
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB