CVE-2024-47186: Filament/tables Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-9h9q-qhxg-89xr
CVSS 6.1
CWE-79
Published
Advisory Summary

CVE-2024-47186 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Filament/tables libraries in the Packagist ecosystem. The issue involves filament has unvalidated colorcolumn and colorentry values that can be used for cross-site scripting. Remediation is available by upgrading affected packages to version 3.2.115.

CVE-2024-47186 at a Glance

CVE Identifier CVE-2024-47186
GHSA Identifier GHSA-9h9q-qhxg-89xr
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Filament/tables
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2024-47186

To remediate this vulnerability, upgrade all affected Filament/tables dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

filament/tables fixed: 3.2.115
Upgrade filament/tables to 3.2.115
filament/infolists fixed: 3.2.115
Upgrade filament/infolists to 3.2.115
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for filament/tables

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-47186, inspect your project dependencies for Filament/tables:

inspect dependencies for filament/tables

Analyze the terminal output to locate any version of Filament/tables in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.115), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Filament/tables, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/filamentphp/filament/releases/tag/v3.2.115). ### PoC For example, using a value such as: ```html 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: ```blade <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: ```html <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](https://github.com/filamentphp/filament/releases/tag/v3.2.115) followed to escape any special characters while outputting inline styles like this: ```blade <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](https://filamentphp.com/docs/3.x/forms/fields/color-picker#color-picker-validation).

CVE-2024-47186 Affected Filament/tables Versions

2 component(s)
Fixed Versions:
3.2.115
Product / Package Ecosystem Affected Versions Fixed Version
filament/tables
Packagist
≥ 3.0.0
< 3.2.115
3.2.115
filament/infolists
Packagist
≥ 3.0.0
< 3.2.115
3.2.115

References

Frequently Asked Questions

What is CVE-2024-47186?
CVE-2024-47186 is a security vulnerability in Filament/tables involving Filament has unvalidated ColorColumn and ColorEntry values that can be used for Cross-site Scripting under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Filament/tables versions are affected?
Affected versions include releases prior to 3.2.115 across affected packages: filament/tables, filament/infolists.
What version fixes CVE-2024-47186?
Upgrading to 3.2.115 (or the latest patched release for your respective branch) resolves the vulnerability.
Is filament/tables affected?
Yes, filament/tables is affected in releases prior to 3.2.115. Upgrade your dependency to 3.2.115 or later.
Is filament/infolists affected?
Yes, filament/infolists is affected in releases prior to 3.2.115. Upgrade your dependency to 3.2.115 or later.
What is the CVSS score of CVE-2024-47186?
CVE-2024-47186 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2024-47186?
CVE-2024-47186 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Packagist dependencies for CVE-2024-47186?
Run the dependency tree command: 'inspect dependencies for filament/tables'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9h9q-qhxg-89xr",
  "modified" : "2026-02-17T19:41:13Z",
  "published" : "2024-09-27T20:51:01Z",
  "aliases" : [ "CVE-2024-47186" ],
  "summary" : "Filament has unvalidated ColorColumn and ColorEntry values that can be used for Cross-site Scripting",
  "details" : "### Summary\n\nIf 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.\n\nVersions of Filament from v3.0.0 through v3.2.114 are affected.\n\nPlease upgrade to Filament [v3.2.115](https://github.com/filamentphp/filament/releases/tag/v3.2.115).\n\n### PoC\n\nFor example, using a value such as:\n\n```html\nblue;\"><script>alert('There\\'s a security problem here')</script style=\"\n```\n\nWould get passed into the `@style()` Blade directive from Laravel to render the correct background color, where `$state` contains the value:\n\n```blade\n<div @style([\n    \"background-color: {$state}\" => $state,\n])></div>\n```\n\nSince Laravel does not escape special characters within the `@style` Blade directive, the effective output HTML would be:\n\n```html\n<div style=\"background-color: blue;\"><script>alert('There\\'s a security problem here')</script style=\"\"></div>\n```\n\nCreating the opportunity for arbitrary JS to run if it was stored in the database.\n\n### Response\n\nThis 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.\n\nThe 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](https://github.com/filamentphp/filament/releases/tag/v3.2.115) followed to escape any special characters while outputting inline styles like this:\n\n```blade\n<div @style([\n    'background-color: ' . e($state) => $state,\n])></div>\n```\n\nAlthough 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](https://filamentphp.com/docs/3.x/forms/fields/color-picker#color-picker-validation).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "filament/tables"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.2.115"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "filament/infolists"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0.0"
      }, {
        "fixed" : "3.2.115"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/filamentphp/filament/security/advisories/GHSA-9h9q-qhxg-89xr"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/filamentphp/filament/commit/df7989352464d08eda5837ef50f9997fad902316"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/filamentphp/filament"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/filamentphp/filament/releases/tag/v3.2.115"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-09-27T20:51:01Z",
    "nvd_published_at" : "2024-09-27T21:15:03Z"
  }
}