CVE-2024-47186
JSON

6.1medium

Filament has unvalidated ColorColumn and ColorEntry values that can be used for Cross-site Scripting

Severity
6.1medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.42% (higher than 38% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-9h9q-qhxg-89xr

Description

Filament is a collection of full-stack components for Laravel development. Versions of Filament from v3.0.0 through v3.2.114 are affected by a cross-site scripting (XSS) vulnerability. If values passed to a `ColorColumn` or `ColumnEntry` are not valid and contain a specific set of characters, applications are vulnerable to XSS attack against a user who opens a page on which a color column or entry is rendered. Filament v3.2.115 fixes this issue.

Affected

Product or packageVersionsReported by
filamentphp filament>= 3.0.0, < 3.2.115, from 3.0.0 before 3.2.115CVE List, NVD
filament/tables (Packagist)from 3.0.0 before 3.2.115GitHub Advisory Database
filament/infolists (Packagist)from 3.0.0 before 3.2.115GitHub Advisory Database

All scores

GitHub_M6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
GitHub6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Filament is a collection of full-stack components for Laravel development. Versions of Filament from v3.0.0 through v3.2.114 are affected by a cross-site scripting (XSS) vulnerability. If values passed to a `ColorColumn` or `ColumnEntry` are not valid and contain a specific set of characters, applications are vulnerable to XSS attack against a user who opens a page on which a color column or entry is rendered. Filament v3.2.115 fixes this issue.

GitHub Advisory Database
Summary

If values passed to a ColorColumn or ColumnEntry are not valid and contain a specific set of characters, applications are vulnerable to XSS attack against a user who opens a page on which a color column or entry is rendered.

Versions of Filament from v3.0.0 through v3.2.114 are affected.

Please upgrade to Filament v3.2.115.

PoC

For example, using a value such as:

blue;"><script>alert('There\'s a security problem here')</script style="

Would get passed into the @style() Blade directive from Laravel to render the correct background color, where $state contains the value:

<div @style([
    "background-color: {$state}" => $state,
])></div>

Since Laravel does not escape special characters within the @style Blade directive, the effective output HTML would be:

<div style="background-color: blue;"><script>alert('There\'s a security problem here')</script style=""></div>

Creating the opportunity for arbitrary JS to run if it was stored in the database.

Response

This vulnerability (in ColorColumn only) was reported by @sv-LayZ, who reported the issue and patched the issue during the evening of 25/09/2024. Thank you Mattis.

The review process concluded on 27/09/2024, which revealed the issue was also present in ColorEntry. This was fixed the same day and Filament v3.2.115 followed to escape any special characters while outputting inline styles like this:

<div @style([
    'background-color: ' . e($state) => $state,
])></div>

Although these components are no longer vulnerable to this type of XSS attack, it is good practice to validate colors, and since many Filament users may be accepting color input using the ColorPicker form component, additional color validation documentation was published.

NVD (es)

Filament es una colección de componentes full-stack para el desarrollo de Laravel. Las versiones de Filament desde la v3.0.0 hasta la v3.2.114 se ven afectadas por una vulnerabilidad de cross site scripting (XSS). Si los valores que se pasan a `ColorColumn` o `ColumnEntry` no son válidos y contienen un conjunto específico de caracteres, las aplicaciones son vulnerables a ataques XSS contra un usuario que abre una página en la que se representa una columna o entrada de color. Filament v3.2.115 corrige este problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-47186 changed 2024-09-27CVE Terms of Use
GitHub Advisory DatabaseGHSA-9h9q-qhxg-89xr changed 2026-02-17CC-BY-4.0
NVDCVE-2024-47186 changed 2026-06-17Public domain