CVE-2026-58654 Details
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.
A vulnerability allowing unrestricted file uploads has been identified in the Grav API plugin (getgrav/grav-plugin-api) version 1.0.0. The issue resides in the avatar upload endpoint, which only validates the client's declared MIME type, allowing authenticated users to upload arbitrary content, including PHP scripts and SVG files with embedded JavaScript. The uploaded files are stored on the server under user/accounts/avatars/ with predictable filenames. While direct access to these files is restricted by .htaccess, they remain on disk, could be included in backups, and might lead to remote code execution or stored cross-site scripting under certain conditions.
Users are advised to update to Grav API plugin version 1.0.1, which addresses this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 8, 2026CISA-ADP
Assessed Jul 8, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/getgrav/grav/security/advisories/GHSA-xc64-vh46-vph6 | CISA-ADP | AdvisoryExploitTechnical AnalysisVendor |
| https://github.com/getgrav/grav/security/advisories/GHSA-xc64-vh46-vph6 | [email protected] | AdvisoryExploitTechnical AnalysisVendor |
| https://www.vulncheck.com/advisories/grav-arbitrary-file-upload-via-avatar-endpoint | [email protected] | AdvisoryRemedy |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-434 | Unrestricted Upload of File with Dangerous Type | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Grav API | 1.0.0 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 8, 2026 | CVE Modified | CISA-ADP |
| Jul 8, 2026 | New CVE Received | [email protected] |
Volerion