CVE-2026-61456: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in getgrav grav
The Grav API plugin (getgrav/grav-plugin-api) before 1.0.3 fails to sanitize SVG files uploaded through the POST /api/v1/media endpoint. The HandlesMediaUploads::processUploadedFile() method validates only the file extension and never invokes Security::sanitizeSVG(), so an authenticated attacker with the api.media.write permission can upload an SVG containing arbitrary JavaScript. The file is stored unmodified and served with Content-Type: image/svg+xml; when an administrator opens it in a browser (directly or via <object>/<iframe>), the embedded script executes in their session context, enabling cookie theft and session hijacking.
AI Analysis
Technical Summary
The Grav API plugin (getgrav/grav-plugin-api) versions prior to 1.0.3 do not properly sanitize SVG files uploaded through the media API endpoint. The HandlesMediaUploads::processUploadedFile() method only validates the file extension and does not call Security::sanitizeSVG(), resulting in SVG files containing malicious JavaScript being stored and served unmodified with the Content-Type image/svg+xml. This allows an authenticated attacker with api.media.write permission to execute arbitrary scripts in the context of an administrator's browser session when the SVG is viewed, enabling cross-site scripting attacks.
Potential Impact
An attacker with authenticated access and the api.media.write permission can upload malicious SVG files containing JavaScript. When an administrator views these SVG files, the embedded script executes in their browser session, potentially allowing cookie theft and session hijacking. This compromises the administrator's session security and may lead to further unauthorized actions within the Grav environment.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict api.media.write permissions to trusted users only and avoid opening SVG files uploaded via the API in administrator browsers. Monitor vendor communications for updates and apply official patches once released.
CVE-2026-61456: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in getgrav grav
Description
The Grav API plugin (getgrav/grav-plugin-api) before 1.0.3 fails to sanitize SVG files uploaded through the POST /api/v1/media endpoint. The HandlesMediaUploads::processUploadedFile() method validates only the file extension and never invokes Security::sanitizeSVG(), so an authenticated attacker with the api.media.write permission can upload an SVG containing arbitrary JavaScript. The file is stored unmodified and served with Content-Type: image/svg+xml; when an administrator opens it in a browser (directly or via <object>/<iframe>), the embedded script executes in their session context, enabling cookie theft and session hijacking.
CVSS v4.0
Score 5.1medium
Affected software
pkg:github/getgrav/grav-plugin-apiRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The Grav API plugin (getgrav/grav-plugin-api) versions prior to 1.0.3 do not properly sanitize SVG files uploaded through the media API endpoint. The HandlesMediaUploads::processUploadedFile() method only validates the file extension and does not call Security::sanitizeSVG(), resulting in SVG files containing malicious JavaScript being stored and served unmodified with the Content-Type image/svg+xml. This allows an authenticated attacker with api.media.write permission to execute arbitrary scripts in the context of an administrator's browser session when the SVG is viewed, enabling cross-site scripting attacks.
Potential Impact
An attacker with authenticated access and the api.media.write permission can upload malicious SVG files containing JavaScript. When an administrator views these SVG files, the embedded script executes in their browser session, potentially allowing cookie theft and session hijacking. This compromises the administrator's session security and may lead to further unauthorized actions within the Grav environment.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict api.media.write permissions to trusted users only and avoid opening SVG files uploaded via the API in administrator browsers. Monitor vendor communications for updates and apply official patches once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-07-09T14:07:55.624Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a51062d68715ace43b84ade
Added to database: 07/10/2026, 14:48:13 UTC
Last enriched: 07/10/2026, 15:03:35 UTC
Last updated: 08/24/2026, 10:52:10 UTC
Views: 89
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.