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
Share

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
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
Privileges Required
Low
User Interaction
None
Scope
X

Lifecycle Timeline

2
Analysis Generated
Jul 08, 2026 - 15:15 vuln.today
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.

AnalysisAI

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.

Technical ContextAI

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.

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.

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

Share

EUVD-2026-42265 vulnerability details – vuln.today

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