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.
Published: 2026-07-08
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

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.

Generated by OpenCVE AI on August 1, 2026 at 16:18 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Grav API plugin to version 1.0.1 or newer.
  • Replace or augment the avatar upload logic with server‑side validation that inspects file content and limits accepted extensions to safe image types such as .jpg, .png, and .gif.
  • Ensure that the avatar directory denies execution of scripts, for example by adding an Apache .htaccess rule that blocks PHP execution or by setting file system permissions that prevent script execution.
  • Consider monitoring the avatar upload directory for unexpected file types or excessive file size to reduce risk.

Generated by OpenCVE AI on August 1, 2026 at 16:18 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 08 Jul 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 08 Jul 2026 14:15:00 +0000

Type Values Removed Values Added
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.
Title Grav - Arbitrary File Upload via Avatar Endpoint
First Time appeared Getgrav
Getgrav grav
Weaknesses CWE-434
CPEs cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*
Vendors & Products Getgrav
Getgrav grav
References
Metrics cvssV3_1

{'score': 4.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N'}

cvssV4_0

{'score': 5.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-08T17:05:11.960Z

Reserved: 2026-07-01T21:54:37.946Z

Link: CVE-2026-58654

cve-icon Vulnrichment

Updated: 2026-07-08T16:38:32.392Z

cve-icon NVD

Status : Deferred

Published: 2026-07-08T14:17:20.153

Modified: 2026-07-08T18:16:33.873

Link: CVE-2026-58654

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-01T16:30:04Z

Weaknesses
  • CWE-434

    Unrestricted Upload of File with Dangerous Type