What’s Vulnerable › Vulnerabilities
CVE-2026-58654: Grav - Arbitrary File Upload via Avatar Endpoint
- Severity: medium (CVSS 4.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.4% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2026-07-08 · updated 2026-07-08
- Weakness: CWE-434
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 products
- getgrav grav: before 1.0.1 — fixed in 1.0.1
How to fix
Upgrade to a fixed version: getgrav grav 1.0.1. Check the vendor advisory for mitigations.
References
- https://github.com/getgrav/grav/security/advisories/GHSA-xc64-vh46-vph6
- https://www.vulncheck.com/advisories/grav-arbitrary-file-upload-via-avatar-endpoint
- https://github.com/getgrav/grav/security/advisories/GHSA-xc64-vh46-vph6
Get alerted when CVE-2026-58654 or the next vulnerability affects your stack