CVE-2026-58654: Grav - Arbitrary File Upload via Avatar Endpoint

Published Jul 8, 2026
·
Updated

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.

Affected Software

1 affected component
getgrav Grav-plugin-api>=1.0.0<1.0.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade getgrav/grav-plugin-api to a version that resolves this vulnerability.

    Fixed in 1.0.1
  2. Configuration

    Modify the avatar upload endpoint validation to not rely solely on client-declared MIME type (getClientMediaType beginning with 'image/'); instead inspect the actual file content and restrict the resulting extension so only safe image formats are stored.

    Grav avatar upload endpoint (/api/v1/users/user/avatar) via getgrav/grav-plugin-api file upload validation = inspect actual file content and restrict uploaded file types/extensions to images

Event History

Jul 8, 2026
CVE Published
via MITRE·01:49 PM
Data Sourced
via MITRE·01:49 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:17 PM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-58654?

The severity of CVE-2026-58654 is medium, rated at 4.3.

2

How do I fix CVE-2026-58654?

To fix CVE-2026-58654, update to the latest version of the Grav API plugin that addresses the file upload vulnerability.

3

What type of vulnerability is CVE-2026-58654?

CVE-2026-58654 is categorized as an arbitrary file upload vulnerability.

4

What software is affected by CVE-2026-58654?

CVE-2026-58654 affects the Grav API plugin, specifically version 1.0.0.

5

What are the potential impacts of CVE-2026-58654?

The potential impacts of CVE-2026-58654 include security risks associated with malicious file uploads, such as exploitation through XSS or path traversal.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203