awcodes/filament-curator
Affected
- introduced
5.0.0, fixed5.1.2(ecosystem)
Fixed versions
5.1.2
Fix
The export has no generic command for this ecosystem.
Advisory
Also known as: CVE-2026-69241
Filament Curator: Stored XSS via unsanitized SVG upload served inline
Summary
SVG files uploaded through the Curator media panel are stored and served inline without any
sanitization. An authenticated user with permission to upload media can upload an SVG
containing embedded JavaScript. When another panel user opens that file via the View
action (which opens the media as a top-level browser document), the embedded script executes
in the origin of the Filament application.
image/svg+xml is included in the default accepted MIME types, so a default installation is
affected unless SVG uploads have been explicitly disabled.
## Impact
Because the SVG is served as a top-level document (not embedded in an <img> tag), any
<script>, event-handler attribute (e.g. onload), or javascript: URI inside it runs with
full script privileges in the application's origin. In a Filament admin context this can be
leveraged to:
The primary escalation path is a lower-privileged content author planting a payload that is
later triggered when a higher-privileged user clicks View on the file. Panel thumbnails
are not affected — they render through an <img> tag, which does not execute SVG script.
## Proof of concept
```xml
<svg xmlns="http://www.w3.org/2000/svg" onload="alert(document.domain)">
<rect width="100" height="100" fill="#fff"/>
</svg>
Patches
The fix sanitizes SVG markup at the upload choke point (Uploader), stripping scripts, event
handlers, and remote references before the file is written to storage. Sanitizing at the
source closes every serving path (the direct storage URL and the on-the-fly
Glide/MediaController fallback) without changing the default accepted MIME types.
Sanitization fails closed: if the markup cannot be parsed it is not stored.
A console command is included to re-sanitize SVG files already stored on disk from earlier
uploads:
php artisan curator:sanitize-svgs # sanitize in place
php artisan curator:sanitize-svgs --dry-run # preview only
After upgrading to a patched release, run curator:sanitize-svgs to clean any SVGs uploaded
before the patch.
Workarounds
If you cannot upgrade immediately, either of the following mitigates the issue:
Credit
Reported via coordinated disclosure by Afsana Alijabarova.
Medium Basis: The source's own band: MODERATE
5.0.0, fixed 5.1.2 (ecosystem)5.1.2
The export has no generic command for this ecosystem.
4.0.0, fixed 4.1.2 (ecosystem)4.1.2
The export has no generic command for this ecosystem.
3.0.0, fixed 3.7.9 (ecosystem)3.7.9
The export has no generic command for this ecosystem.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0