Impact
The Grav API plugin version 1.0.0 contains a file‑upload flaw in the avatar endpoint. Only the client‑declared MIME type beginning with 'image/' is checked, while the actual file content and extension are not inspected. This allows an authenticated user to upload arbitrary content—including PHP code, SVG files with embedded JavaScript, or polyglot payloads—under the predictable path user/accounts/avatars/. Because the stored files are protected from direct HTTP access by an .htaccess rule that returns 403, the files still persist on disk and could be executed or rendered if the server’s configuration or permissions permit, leading to remote code execution or stored cross‑site scripting.
Affected Systems
All Grav sites that employ the getgrav/grav‑plugin‑api plugin version 1.0.0 are affected, regardless of the Grav core version. The flaw was fixed in plugin version 1.0.1, so any instance that has not upgraded to 1.0.1 or later remains vulnerable.
Risk and Exploitability
The CVSS score of 5.3 indicates medium severity, and the EPSS score of less than 1% suggests low exploitation probability. The vulnerability is limited to authenticated users who can reach the avatar upload endpoint. An attacker would need to upload a malicious file and then rely on the site’s file‑execution configuration to achieve remote code execution or inject malicious scripts. No known widespread exploitation exists, as indicated by its absence from the CISA KEV catalog, but the potential impact still warrants prompt remediation.
OpenCVE Enrichment