Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS05aDlxLXFoeGctODl4cs4AA_2Z

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

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.

Permalink: https://github.com/advisories/GHSA-9h9q-qhxg-89xr
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS05aDlxLXFoeGctODl4cs4AA_2Z
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: 3 months ago
Updated: about 2 months ago


EPSS Percentage: 0.00052
EPSS Percentile: 0.228

Identifiers: GHSA-9h9q-qhxg-89xr, CVE-2024-47186
References: Repository: https://github.com/filamentphp/filament
Blast Radius: 0.0

Affected Packages

packagist:filament/infolists
Dependent packages: 10
Dependent repositories: 10
Downloads: 5,687,018 total
Affected Version Ranges: >= 3.0.0, < 3.2.115
Fixed in: 3.2.115
All affected versions: 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.8, 3.0.9, 3.0.10, 3.0.11, 3.0.12, 3.0.13, 3.0.14, 3.0.15, 3.0.16, 3.0.17, 3.0.18, 3.0.19, 3.0.20, 3.0.21, 3.0.22, 3.0.23, 3.0.24, 3.0.25, 3.0.26, 3.0.27, 3.0.28, 3.0.29, 3.0.30, 3.0.31, 3.0.32, 3.0.33, 3.0.34, 3.0.35, 3.0.36, 3.0.37, 3.0.38, 3.0.39, 3.0.40, 3.0.41, 3.0.42, 3.0.43, 3.0.44, 3.0.45, 3.0.46, 3.0.47, 3.0.48, 3.0.49, 3.0.50, 3.0.51, 3.0.52, 3.0.53, 3.0.54, 3.0.55, 3.0.56, 3.0.57, 3.0.58, 3.0.59, 3.0.60, 3.0.61, 3.0.62, 3.0.63, 3.0.64, 3.0.65, 3.0.66, 3.0.67, 3.0.68, 3.0.69, 3.0.70, 3.0.71, 3.0.72, 3.0.73, 3.0.74, 3.0.75, 3.0.76, 3.0.77, 3.0.78, 3.0.79, 3.0.80, 3.0.81, 3.0.82, 3.0.83, 3.0.84, 3.0.85, 3.0.86, 3.0.87, 3.0.88, 3.0.89, 3.0.90, 3.0.91, 3.0.92, 3.0.93, 3.0.94, 3.0.95, 3.0.96, 3.0.97, 3.0.98, 3.0.99, 3.0.100, 3.0.101, 3.0.102, 3.0.103, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.14, 3.1.15, 3.1.16, 3.1.17, 3.1.18, 3.1.19, 3.1.20, 3.1.21, 3.1.22, 3.1.23, 3.1.24, 3.1.25, 3.1.26, 3.1.27, 3.1.28, 3.1.29, 3.1.30, 3.1.31, 3.1.32, 3.1.33, 3.1.34, 3.1.35, 3.1.36, 3.1.37, 3.1.39, 3.1.40, 3.1.41, 3.1.42, 3.1.43, 3.1.44, 3.1.45, 3.1.46, 3.1.47, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.2.12, 3.2.13, 3.2.14, 3.2.15, 3.2.16, 3.2.17, 3.2.18, 3.2.19, 3.2.20, 3.2.21, 3.2.22, 3.2.23, 3.2.24, 3.2.25, 3.2.26, 3.2.27, 3.2.28, 3.2.29, 3.2.30, 3.2.31, 3.2.32, 3.2.33, 3.2.34, 3.2.35, 3.2.36, 3.2.37, 3.2.38, 3.2.39, 3.2.40, 3.2.41, 3.2.42, 3.2.43, 3.2.44, 3.2.45, 3.2.46, 3.2.47, 3.2.48, 3.2.49, 3.2.50, 3.2.51, 3.2.52, 3.2.53, 3.2.54, 3.2.55, 3.2.56, 3.2.57, 3.2.58, 3.2.59, 3.2.60, 3.2.61, 3.2.62, 3.2.63, 3.2.64, 3.2.65, 3.2.66, 3.2.67, 3.2.68, 3.2.69, 3.2.70, 3.2.71, 3.2.72, 3.2.73, 3.2.74, 3.2.75, 3.2.76, 3.2.77, 3.2.78, 3.2.79, 3.2.80, 3.2.81, 3.2.82, 3.2.83, 3.2.84, 3.2.85, 3.2.86, 3.2.87, 3.2.88, 3.2.89, 3.2.90, 3.2.91, 3.2.92, 3.2.93, 3.2.94, 3.2.95, 3.2.96, 3.2.97, 3.2.98, 3.2.99, 3.2.100, 3.2.101, 3.2.102, 3.2.103, 3.2.104, 3.2.105, 3.2.106, 3.2.107, 3.2.108, 3.2.109, 3.2.110, 3.2.111, 3.2.112, 3.2.113, 3.2.114
All unaffected versions: 2.17.33, 3.2.115, 3.2.116, 3.2.117, 3.2.118, 3.2.119, 3.2.120, 3.2.121, 3.2.122, 3.2.123, 3.2.124, 3.2.125, 3.2.126, 3.2.127, 3.2.128, 3.2.129, 3.2.130
packagist:filament/tables
Dependent packages: 34
Dependent repositories: 1,002
Downloads: 8,143,258 total
Affected Version Ranges: >= 3.0.0, < 3.2.115
Fixed in: 3.2.115
All affected versions: 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.8, 3.0.9, 3.0.10, 3.0.11, 3.0.12, 3.0.13, 3.0.14, 3.0.15, 3.0.16, 3.0.17, 3.0.18, 3.0.19, 3.0.20, 3.0.21, 3.0.22, 3.0.23, 3.0.24, 3.0.25, 3.0.26, 3.0.27, 3.0.28, 3.0.29, 3.0.30, 3.0.31, 3.0.32, 3.0.33, 3.0.34, 3.0.35, 3.0.36, 3.0.37, 3.0.38, 3.0.39, 3.0.40, 3.0.41, 3.0.42, 3.0.43, 3.0.44, 3.0.45, 3.0.46, 3.0.47, 3.0.48, 3.0.49, 3.0.50, 3.0.51, 3.0.52, 3.0.53, 3.0.54, 3.0.55, 3.0.56, 3.0.57, 3.0.58, 3.0.59, 3.0.60, 3.0.61, 3.0.62, 3.0.63, 3.0.64, 3.0.65, 3.0.66, 3.0.67, 3.0.68, 3.0.69, 3.0.70, 3.0.71, 3.0.72, 3.0.73, 3.0.74, 3.0.75, 3.0.76, 3.0.77, 3.0.78, 3.0.79, 3.0.80, 3.0.81, 3.0.82, 3.0.83, 3.0.84, 3.0.85, 3.0.86, 3.0.87, 3.0.88, 3.0.89, 3.0.90, 3.0.91, 3.0.92, 3.0.93, 3.0.94, 3.0.95, 3.0.96, 3.0.97, 3.0.98, 3.0.99, 3.0.100, 3.0.101, 3.0.102, 3.0.103, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.1.13, 3.1.14, 3.1.15, 3.1.16, 3.1.17, 3.1.18, 3.1.19, 3.1.20, 3.1.21, 3.1.22, 3.1.23, 3.1.24, 3.1.25, 3.1.26, 3.1.27, 3.1.28, 3.1.29, 3.1.30, 3.1.31, 3.1.32, 3.1.33, 3.1.34, 3.1.35, 3.1.36, 3.1.37, 3.1.39, 3.1.40, 3.1.41, 3.1.42, 3.1.43, 3.1.44, 3.1.45, 3.1.46, 3.1.47, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.2.6, 3.2.7, 3.2.8, 3.2.9, 3.2.10, 3.2.11, 3.2.12, 3.2.13, 3.2.14, 3.2.15, 3.2.16, 3.2.17, 3.2.18, 3.2.19, 3.2.20, 3.2.21, 3.2.22, 3.2.23, 3.2.24, 3.2.25, 3.2.26, 3.2.27, 3.2.28, 3.2.29, 3.2.30, 3.2.31, 3.2.32, 3.2.33, 3.2.34, 3.2.35, 3.2.36, 3.2.37, 3.2.38, 3.2.39, 3.2.40, 3.2.41, 3.2.42, 3.2.43, 3.2.44, 3.2.45, 3.2.46, 3.2.47, 3.2.48, 3.2.49, 3.2.50, 3.2.51, 3.2.52, 3.2.53, 3.2.54, 3.2.55, 3.2.56, 3.2.57, 3.2.58, 3.2.59, 3.2.60, 3.2.61, 3.2.62, 3.2.63, 3.2.64, 3.2.65, 3.2.66, 3.2.67, 3.2.68, 3.2.69, 3.2.70, 3.2.71, 3.2.72, 3.2.73, 3.2.74, 3.2.75, 3.2.76, 3.2.77, 3.2.78, 3.2.79, 3.2.80, 3.2.81, 3.2.82, 3.2.83, 3.2.84, 3.2.85, 3.2.86, 3.2.87, 3.2.88, 3.2.89, 3.2.90, 3.2.91, 3.2.92, 3.2.93, 3.2.94, 3.2.95, 3.2.96, 3.2.97, 3.2.98, 3.2.99, 3.2.100, 3.2.101, 3.2.102, 3.2.103, 3.2.104, 3.2.105, 3.2.106, 3.2.107, 3.2.108, 3.2.109, 3.2.110, 3.2.111, 3.2.112, 3.2.113, 3.2.114
All unaffected versions: 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.0.10, 1.0.11, 1.0.12, 1.0.13, 1.0.14, 1.0.15, 1.0.16, 1.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4, 2.6.5, 2.6.6, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.7.5, 2.7.6, 2.7.7, 2.7.8, 2.7.9, 2.7.10, 2.7.11, 2.7.12, 2.7.13, 2.7.14, 2.7.15, 2.7.16, 2.7.17, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.8.6, 2.8.7, 2.8.8, 2.8.9, 2.8.10, 2.8.11, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.9.4, 2.9.5, 2.9.6, 2.9.7, 2.9.8, 2.9.9, 2.9.10, 2.9.11, 2.9.12, 2.9.13, 2.9.14, 2.9.15, 2.9.16, 2.9.17, 2.9.18, 2.9.19, 2.10.0, 2.10.1, 2.10.2, 2.10.3, 2.10.4, 2.10.5, 2.10.6, 2.10.7, 2.10.8, 2.10.9, 2.10.10, 2.10.11, 2.10.12, 2.10.13, 2.10.14, 2.10.15, 2.10.16, 2.10.17, 2.10.18, 2.10.19, 2.10.20, 2.10.21, 2.10.22, 2.10.23, 2.10.24, 2.10.25, 2.10.26, 2.10.27, 2.10.28, 2.10.29, 2.10.30, 2.10.31, 2.10.32, 2.10.33, 2.10.34, 2.10.35, 2.10.36, 2.10.37, 2.10.38, 2.10.39, 2.10.40, 2.10.41, 2.10.42, 2.10.43, 2.10.44, 2.10.45, 2.10.46, 2.11.0, 2.11.1, 2.11.2, 2.11.3, 2.11.4, 2.11.5, 2.11.6, 2.11.7, 2.11.8, 2.11.9, 2.11.10, 2.11.11, 2.11.12, 2.12.0, 2.12.1, 2.12.2, 2.12.3, 2.12.4, 2.12.5, 2.12.6, 2.12.7, 2.12.8, 2.12.9, 2.12.10, 2.12.11, 2.12.12, 2.12.13, 2.12.14, 2.12.15, 2.12.16, 2.12.17, 2.12.18, 2.12.19, 2.12.20, 2.12.21, 2.12.22, 2.12.23, 2.12.24, 2.12.25, 2.12.26, 2.12.27, 2.12.28, 2.12.29, 2.12.30, 2.12.31, 2.13.0, 2.13.1, 2.13.2, 2.13.3, 2.13.4, 2.13.5, 2.13.6, 2.13.7, 2.13.8, 2.13.9, 2.13.10, 2.13.11, 2.13.12, 2.13.13, 2.13.14, 2.13.15, 2.13.16, 2.13.17, 2.13.18, 2.13.19, 2.13.20, 2.13.21, 2.13.22, 2.13.23, 2.13.24, 2.13.25, 2.13.26, 2.13.27, 2.13.28, 2.14.0, 2.14.1, 2.14.2, 2.14.3, 2.14.4, 2.14.5, 2.15.0, 2.15.1, 2.15.2, 2.15.3, 2.15.4, 2.15.5, 2.15.6, 2.15.7, 2.15.8, 2.15.9, 2.15.10, 2.15.11, 2.15.12, 2.15.13, 2.15.14, 2.15.15, 2.15.16, 2.15.17, 2.15.18, 2.15.19, 2.15.20, 2.15.21, 2.15.22, 2.15.23, 2.15.24, 2.15.25, 2.15.26, 2.15.27, 2.15.28, 2.15.29, 2.15.30, 2.15.31, 2.15.32, 2.15.33, 2.15.34, 2.15.35, 2.15.36, 2.15.37, 2.15.38, 2.15.39, 2.15.40, 2.15.41, 2.15.42, 2.15.43, 2.15.44, 2.15.45, 2.15.46, 2.15.47, 2.15.48, 2.15.49, 2.16.0, 2.16.1, 2.16.2, 2.16.3, 2.16.4, 2.16.5, 2.16.6, 2.16.7, 2.16.8, 2.16.9, 2.16.10, 2.16.11, 2.16.12, 2.16.13, 2.16.14, 2.16.15, 2.16.16, 2.16.17, 2.16.18, 2.16.19, 2.16.20, 2.16.21, 2.16.22, 2.16.23, 2.16.24, 2.16.25, 2.16.26, 2.16.27, 2.16.28, 2.16.29, 2.16.31, 2.16.32, 2.16.33, 2.16.34, 2.16.35, 2.16.36, 2.16.37, 2.16.38, 2.16.39, 2.16.40, 2.16.41, 2.16.42, 2.16.43, 2.16.44, 2.16.45, 2.16.46, 2.16.47, 2.16.48, 2.16.49, 2.16.50, 2.16.51, 2.16.52, 2.16.53, 2.16.54, 2.16.55, 2.16.56, 2.16.57, 2.16.58, 2.16.59, 2.16.60, 2.16.61, 2.16.62, 2.16.63, 2.16.64, 2.16.65, 2.16.66, 2.16.67, 2.16.68, 2.16.69, 2.16.70, 2.17.0, 2.17.1, 2.17.2, 2.17.3, 2.17.4, 2.17.5, 2.17.6, 2.17.7, 2.17.8, 2.17.9, 2.17.10, 2.17.11, 2.17.12, 2.17.13, 2.17.14, 2.17.15, 2.17.16, 2.17.17, 2.17.18, 2.17.19, 2.17.20, 2.17.21, 2.17.22, 2.17.24, 2.17.25, 2.17.26, 2.17.27, 2.17.28, 2.17.29, 2.17.30, 2.17.31, 2.17.32, 2.17.33, 2.17.34, 2.17.35, 2.17.36, 2.17.37, 2.17.38, 2.17.39, 2.17.40, 2.17.41, 2.17.42, 2.17.43, 2.17.44, 2.17.45, 2.17.46, 2.17.47, 2.17.48, 2.17.49, 2.17.50, 2.17.51, 2.17.52, 2.17.53, 2.17.54, 2.17.55, 2.17.56, 3.2.115, 3.2.116, 3.2.117, 3.2.118, 3.2.119, 3.2.120, 3.2.121, 3.2.122, 3.2.123, 3.2.124, 3.2.125, 3.2.126, 3.2.127, 3.2.128, 3.2.129, 3.2.130, 3.2.131