CVE-2026-61456: getgrav Grav API plugin stored XSS via SVG upload in media API

CVE-2026-61456 · Severity: medium · CVSS 4.6 · Published 2026-07-10

The Grav API plugin, which provides programmatic access to the Grav content management system, contains a security flaw in how it handles file uploads. An attacker with basic media upload permissions can upload malicious image files (SVG) containing hidden scripts. If an administrator views these files, the scripts can run in their browser, potentially allowing the attacker to steal login sessions or take control of the website.

Technologies: Grav API Plugin. Vendors: Grav.

Quick answers

Is CVE-2026-61456 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-61456 being exploited in the wild.
How severe is CVE-2026-61456?
Medium severity, with a CVSS score of 4.6, published 10 July 2026.
Which products and versions are affected?
Grav API Plugin < 1.0.3.
Is there a fix for CVE-2026-61456?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-61456 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-61456?
Check whether you run Grav API Plugin at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A stored cross-site scripting (XSS) vulnerability exists in the Grav API plugin (getgrav/grav-plugin-api) before version 1.0.3. The `HandlesMediaUploads::processUploadedFile()` method, which handles requests to the `POST /api/v1/media` endpoint, validates file extensions but fails to invoke `Security::sanitizeSVG()`. An authenticated attacker with `api.media.write` permissions can upload an SVG file containing malicious JavaScript. Because the file is served with the `image/svg+xml` MIME type, the script executes in the context of any user (including administrators) who views the file directly or via an iframe. This can lead to session hijacking and unauthorized administrative actions. The issue is resolved in version 1.0.3 by ensuring SVG content is sanitized during the upload process.

Affected products

  • getgrav Grav API Plugin < 1.0.3

Timeline

  • 2026-06-24: advisory: Vendor advisory GHSA-7vhm-8x52-2r5p published
  • 2026-07-10: disclosed: CVE-2026-61456 published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.