GitHub Advisoryadvisory · Packagist
GHSA-9h9q-qhxg-89xr Filament has unvalidated ColorColumn and ColorEntry values that can be used for Cross-site Scripting
MEDIUM
Official page ↗
- Aliases
- CVE-2024-47186
- Ecosystem
- Packagist
- Packages
- filament/tables, filament/infolists
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Weaknesses
- CWE-79
- Reviewed
- 2024-09-27
Affected packages
• Packagist filament/tables: >= 3.0.0, < 3.2.115 → fixed in 3.2.115
• Packagist filament/infolists: >= 3.0.0, < 3.2.115 → fixed in 3.2.115
Description
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:
```html
blue;">alert('There\'s a security problem here') $state,
])>
```
Since Laravel does not escape special characters within the `@style` Blade directive, the effective output HTML would be:
```html
alert('There\'s a security problem here')
```
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:
```blade
$state,
])>
```
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.
Related
Alias · CVE (1)
- CVE-2024-47186 Filament is a collection of full-stack components for Laravel development. vulnerability
Weakness · CWE (1)
- CWE-79 Improper Neutralization of Input During Web Page Generation weakness