PT-2026-56444 · Grav · Grav-Plugin-Api
CVSS v4.0
5.3
Medium
| Vector | AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions
Grav API plugin versions prior to 1.0.1
Description
An unrestricted file upload issue exists in the avatar upload endpoint '/api/v1/users/user/avatar'. The system only validates the client-declared MIME type using
getClientMediaType to check if it begins with 'image/', without inspecting actual file content or restricting extensions. This allows authenticated users to upload arbitrary content, such as PHP code, SVG files with embedded JavaScript, or polyglot payloads, to the 'user/accounts/avatars/' directory with predictable filenames. While .htaccess blocks direct HTTP access to these files, their persistence on disk could enable remote code execution or stored Cross-Site Scripting (XSS) if a path traversal flaw or server misconfiguration is present.Recommendations
Update to version 1.0.1.
Exploit
Fix
RCE
Unrestricted File Upload
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Grav-Plugin-Api