Description
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.
Severity (CVSS)
| Base score | 4.6 |
|---|---|
| Severity | Medium |
| Version | CVSS 3.1 |
| Vector | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:N |
| Provided by | CNA |
Weaknesses
- CWE-79 — CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected products
| Vendor | Product | Versions |
|---|---|---|
| getgrav | grav-plugin-api | < 1.0.2 |
References
- https://github.com/getgrav/grav/security/advisories/GHSA-7vhm-8x52-2r5p (x_refsource_CONFIRM)
- https://github.com/getgrav/grav-plugin-api/commit/d25eedb84a387f2c71b12a374f2a4b3d74339a7e (x_refsource_MISC)
- https://github.com/getgrav/grav-plugin-api/releases/tag/1.0.2 (x_refsource_MISC)
Generated from the official CVE List on 20 Aug 2026 07:06 UTC.