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 1.0.0 allows an authenticated user to upload any file through the avatar endpoint, validating only the client‑declared MIME type and not This such as PHP scripts, SVGs containing JavaScript, or polyglot files can be stored in the user/accounts/avatars/ directory, which could lead to remote code execution or stored cross‑site scripting if the server is misconfigured or permits execution of files from that directory.

Affected Systems

Any Grav site that has the getgrav/grav-plugin-api version 1.0.0 installed is affected. All instances of Grav that have not been updated to 1.0.1 or later are vulnerable.

Risk and Exploitability

The CVSS score of 5.3 and an EPSS score of less than 1% indicate a medium severity and low likelihood of exploitation, respectively. However, exploitation requires that the attacker manages to upload a file and that the server’s configuration allows that file to be executed or rendered. If .htaccess rules block execution but the attacker can circumvent them, or if a path traversal or other misconfiguration exists, the vulnerability can be leveraged to run arbitrary code or inject malicious scripts.

Generated by OpenCVE AI on July 23, 2026 at 11:53 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the Grav API plugin to version 1.0.1 or later.
  • Enforce server‑side validation that checks the actual file content and restricts allowed extensions to safe image types such as .jpg, .png, and .gif.
  • Configure the avatar directory to deny execution of scripts, for example by adding an Apache .htaccess rule that blocks PHP execution or by setting OS permissions to prevent script execution.

Generated by OpenCVE AI on July 23, 2026 at 11:53 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

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-23T12:00:05Z

Weaknesses
  • CWE-434

    Unrestricted Upload of File with Dangerous Type