Executive brief
GutenKit is a WordPress plugin for creating page layouts and content blocks. The plugin fails to properly filter malicious code in SVG image files uploaded through certain API endpoints, allowing users with publishing permissions (such as Authors) to upload specially crafted SVG files containing JavaScript code. When an administrator or other user views the uploaded file, the malicious script executes in their browser, potentially allowing attackers to steal credentials, modify content, or compromise account security.
Technical details
This is a stored cross-site scripting (XSS) vulnerability caused by insufficient sanitization of SVG file uploads. The vulnerable plugin accepts SVG uploads via the WordPress REST API media endpoint but does not strip malicious attributes (e.g., onload) or embedded script tags, unlike the standard Media Library uploader which does sanitize these. An authenticated user with the upload_files capability (Author role or higher) can upload a crafted SVG containing JavaScript payloads. The unsanitized SVG is then served with an image/svg+xml MIME type from the site's own origin, allowing the embedded script to execute in the context of any user who accesses the file. The vulnerability requires authentication and file upload capability but affects all users who subsequently view the malicious file. Fixed in version 2.5.0.
Affected products
- GuetenKit GutenKit before 2.5.0
Timeline
- 2026-08-18: disclosed
- 2026-05-26: patched: Version 2.5.0 released