Loading…
CVE-2024-47186 — Filament has unvalidated ColorColumn and ColorEntry values that can be used for · VulnScope\n```\n\nSince Laravel does not escape special characters within the `@style` Blade directive, the effective output HTML would be:\n\n```html\n
\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
$state,\n])>
\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).","inLanguage":"zh-TW","url":"https://vulnscope.dev/zh/cve/CVE-2024-47186","author":{"@type":"Organization","name":"VulnScope","url":"https://vulnscope.dev"},"publisher":{"@type":"Organization","name":"VulnScope","url":"https://vulnscope.dev"},"about":{"@type":"Thing","name":"CVE-2024-47186","identifier":"CVE-2024-47186","additionalProperty":[{"@type":"PropertyValue","name":"CVSS","value":6.1},{"@type":"PropertyValue","name":"EPSS","value":0.01087},{"@type":"PropertyValue","name":"KEV","value":false}]}}

CVE-2024-47186

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

6.1
MEDIUM
CVSS 3.1
EPSS 1.1%

描述

### 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

要修補 CVE-2024-47186,請將受影響套件升級到下列已修補版本。

  • 升級至 3.2.115 或更新版本
  • 升級至 3.2.115 或更新版本

CVE-2024-47186 正在被利用嗎?

低 — EPSS 為 1.1%,目前沒有觀察到大規模利用活動。