Stored XSS Filament Comments: CVE Research (CVE-2026-90943)
Created August 21, 2026 • Last updated September 17, 2026 • 6 min read • 2,130 views
I found a stored XSS filament comments bug while auditing open source packages. The package is a Filament plugin. It adds comments to any Eloquent model. While reviewing the code, I saw the Blade template wraps user input in toHtmlString(). As a result, this bypasses Laravel's output escaping. On top of that, the package never cleans the input. So any HTML a user submits renders in the browser as-is.
CVE-2026-90943
Summary of the stored XSS filament comments issue
In short, filament comments renders bodies as raw HTML. It wraps input in toHtmlString(). This returns an Htmlable object. Because of this, Blade's {{ }} does not escape the value. So any HTML in a comment runs in the viewer's browser.
Every logged-in user can exploit this bug. The bundled policy lets all users create comments. As a result, an attacker can store a payload. That payload runs as JavaScript in admin sessions. All versions up to 3.0.0 are at risk.
On Filament 3, the default rich editor is at risk. On Filament 4 and 5, the markdown editor is at risk instead.
How the stored XSS filament comments bug works
At its core, the bug is one render line in the Blade view. This line has been there since the very first release.
@if(config('filament-comments.editor') === 'markdown')
{{ Str::of($comment->comment)->markdown()->toHtmlString() }}
@else
{{ Str::of($comment->comment)->toHtmlString() }}
@endif
So why is this a problem? The toHtmlString() method returns a HtmlString object. This object uses the Htmlable interface. When Blade sees {{ $value }}, it calls e() to escape. But e() skips Htmlable values. In other words, the comment goes to the page as raw HTML.
Whether the payload reaches this line depends on the editor. Each Filament version works a bit differently.
Filament 3 (package 1.0.0 through 1.5.1), rich editor
On Filament 3, the RichEditor does not clean input on the server. As a result, every payload is stored byte for byte. All of these payloads fire right away:
Payload | Stored | Trigger |
|---|---|---|
| As-is | Auto (image 404) |
| As-is | Auto (SVG load) |
| As-is | Auto (script runs) |
| As-is | On click |
Notably, Filament's own source warns about this risk. The RichEditor code says: "The rich editor outputs raw HTML... always sanitize." Yet filament comments ignores this warning.
With no config change needed, the default install is at risk out of the box.
Filament 4 / 5 (package 2.0.0 through 3.0.0), markdown editor
On Filament 4, the RichEditor does clean input server-side. It strips event handlers, javascript: URIs, <script>, <svg>, and <iframe>. For that reason, the rich editor path is safe here.
On the other hand, the MarkdownEditor stores values as-is. After that, Str::of($comment)->markdown() passes inline HTML to the browser. Although CommonMark escapes block-level tags, inline vectors still run:
<img src=x onerror=alert(1)>
<svg onload=alert(1)>
hi <b onmouseover=alert(1)>x</b>
[click](javascript:alert(1)) → <a href="javascript:alert(1)">
In other words, the markdown editor config is at risk on Filament 4 and 5.
Since both vectors use the same render line, the entire release history is hit.
Who can do this
By default, the bundled policy (FilamentCommentPolicy::create()) returns true for every user. Therefore, any panel user can plant a stored XSS payload. That payload then fires in an admin's session.
Proof of Concept
What you need: A model with HasFilamentComments and comments on a resource page.
I tested this stored XSS filament comments bug on both vectors:
Filament 3.3.54 with package 1.5.1 (rich editor, default)
Filament 4.11.3 with Laravel 12.58 and PHP 8.5 (markdown editor)
Follow these steps to test it:
First, log in as a normal panel user. Then open a record with comments.
Next, open the browser console. Run this code:
const comp = window.Livewire.all().find(x => x.name === 'comments');
await comp.$wire.set('data.comment', '<img src=x onerror=alert(1)>');
await comp.$wire.call('create');
On Filament 3 you can also use <script>alert(1)</script>.
After that, the comment list reloads. The browser asks for
src=x, gets a 404, andonerrorfires. This proves the stored XSS filament comments bug works.

The server stores values byte for byte. No cleaning happens on the create path. Note that using the console is just a handy way to fill the field. The server takes whatever data.comment you send.
Impact
This is a stored, cross-user XSS. A low-level user can run any script in the browser of anyone viewing comments. This includes admins.
What can an attacker do? They can steal session tokens and cookies. On top of that, they can act as the victim. Furthermore, they can gain higher access in the panel.
On Filament 3, the default install is at risk. Meanwhile, on Filament 4 and 5, installs with the markdown editor are at risk.
Severity
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N = 5.4 (Moderate)
AV:N (Network). The attacker sends a comment over the web.
AC:L (Low). No special setup is needed. The payload renders on every page load.
PR:L (Low). A panel account is needed. The bundled policy grants this by default.
UI:R (Required). A victim must visit the page with the bad comment.
S:C (Changed). Script runs in the victim's browser, crossing auth contexts.
C:L (Low). The attacker can read tokens and cookies, but not the server.
I:L (Low). The attacker can act as the victim in the panel.
A:N (None). No denial of service occurs.
Fix for the stored XSS filament comments issue
To fix this, replace the raw render line with a CommentSanitizer class. This class uses Symfony's HTML Sanitizer with a safe-elements allowlist.
resources/views/comments.blade.php (after the fix):
{{ \Parallax\FilamentComments\Support\CommentSanitizer::render($comment->comment, config('filament-comments.editor')) }}
src/Support/CommentSanitizer.php:
<?php
namespace Parallax\FilamentComments\Support;
use Illuminate\Support\HtmlString;
use Illuminate\Support\Str;
use Symfony\Component\HtmlSanitizer\HtmlSanitizer;
use Symfony\Component\HtmlSanitizer\HtmlSanitizerConfig;
class CommentSanitizer
{
public static function render(?string $comment, string $editor): HtmlString
{
$comment ??= '';
if ($editor === 'markdown') {
$html = Str::markdown($comment, [
'html_input' => 'strip',
'allow_unsafe_links' => false,
]);
} else {
$html = $comment;
}
return new HtmlString(static::sanitizer()->sanitize($html));
}
protected static function sanitizer(): HtmlSanitizer
{
$config = (new HtmlSanitizerConfig())
->allowSafeElements()
->allowLinkSchemes(['https', 'http', 'mailto']);
return new HtmlSanitizer($config);
}
}
Here is what this fix does:
First, the markdown path strips inline HTML. It also blocks unsafe links.
In addition, both paths run through Symfony's HTML Sanitizer. This removes event handlers and bad URIs.
Finally,
symfony/html-sanitizeris added as a new dependency.
Disclosure Timeline
Date | Event |
|---|---|
2026-07-21 | Reported to Parallax via GitHub Security Advisory (GHSA-37jh-3jcq-x343), including a proposed patch in the advisory's private fork |
2026-08-04 | Follow-up on the advisory. No response |
2026-08-29 | Second follow-up on GitHub and email to Parallax. No response |
2026-09-11 | Third follow-up, tagging all repository maintainers. No response |
2026-09-12 | Submitted to VulnCheck (CNA) |
2026-09-14 | CVE-2026-90943 published by VulnCheck as CVSS 4.0 9.3 Critical. GitHub Advisory Database entry created (unreviewed) |
2026-09-15 | VulnCheck confirmed publication. Maintainer notified of the CVE on the original advisory |