CVE-2026-58654 Grav - Arbitrary File Upload via Avatar Endpoint
Authenticated users can upload arbitrary files via the avatar endpoint, potentially leading to remote code execution or stored XSS if server configurations allow direct access.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-58654?
CVE-2026-58654 is a medium-severity vulnerability in Grav, published on 8 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Official 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.
Weakness: CWE-434
Which versions are affected by CVE-2026-58654?
How do I fix CVE-2026-58654?
No fix has been published for CVE-2026-58654 yet. Limit exposure of the affected software until one is available.
Is CVE-2026-58654 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-58654 exists.
Sources
Also known as GHSA-w3xr-jx24-vw2h, GHSA-xc64-vh46-vph6.