CVE-2026-61607: Grav API Plugin: Stored XSS via SVG Upload - API Media Pipeline Bypasses Sanitizer

Published Aug 19, 2026
·
Updated

Grav API Plugin is a RESTful API for Grav CMS that provides full headless access to your site's content. Prior to 1.0.2, the Grav API plugin POST /api/v1/media pipeline in HandlesMediaUploads::processUploadedFile() validates an SVG filename extension but does not invoke Security::sanitizeSVG(). An attacker with api.media.write permission can store an SVG containing JavaScript, and the server returns the file as Content-Type: image/svg+xml so the script executes when a victim opens it, allowing session data theft and authenticated actions. This issue is fixed in version 1.0.2.

Affected Software

1 affected component
Grav API Plugin<1.0.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Grav API Plugin to a version that resolves this vulnerability.

    Fixed in 1.0.2

Event History

Aug 19, 2026
CVE Published
via MITRE·03:18 PM
Data Sourced
via MITRE·03:18 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who can exploit this issue?

An attacker needs api.media.write permission and must be able to submit an SVG through the POST /api/v1/media endpoint. Exploitation also requires a victim to open the uploaded SVG.

2

Which installations are affected?

Grav API Plugin versions prior to 1.0.2 are affected. The vulnerable upload path is HandlesMediaUploads::processUploadedFile(), which accepts SVG files based on their filename extension without invoking SVG sanitization.

3

What is the impact if a malicious SVG is opened?

Because the server returns the uploaded file as image/svg+xml, JavaScript embedded in the SVG can execute in the victim's browser. This can enable theft of session data and authenticated actions as the victim.

4

What should be done if updating is not immediately possible?

The provided information identifies api.media.write as the permission required to upload the malicious SVG. Restrict that permission to trusted users and prevent untrusted SVG uploads through the API media endpoint until the plugin can be updated to 1.0.2.

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