5.3medium
Grav - Arbitrary File Upload via Avatar Endpoint
- Severity
- 5.3medium CVSS:4.0 by VulnCheck
- Exploit likelihood
- 0.26% (higher than 19% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- VulnCheck
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Grav Grav | before 1.0.1 Not affected: 1.0.1 | CVE List |
All scores
| VulnCheck | 5.3medium CVSS:4.0 | 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 |
| VulnCheck | 4.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.
References
| https://github.com/getgrav/grav/security/advisories/GHSA-xc64-vh46-vph6 | exploit, vendor-advisory | |
| https://www.vulncheck.com/advisories/grav-arbitrary-file-upload-via-avatar-endpoint | third-party-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-58654 changed 2026-07-08 | CVE Terms of Use |
| NVD | CVE-2026-58654 changed 2026-07-08 | Public domain |