Laravel Backpack CRUD: Stored XSS in the color column — the `@if($column['escaped'])` branches are inverted
Summary
The Blade template for the color column type (src/resources/views/crud/columns/color.blade.php) has its escaped/unescaped rendering branches inverted relative to every other column template in the library. Because $column['escaped'] defaults to true, values stored in color columns are rendered unescaped by default, enabling Stored XSS if column values are not validated before storage.
Details
All other column templates in src/resources/views/crud/columns/ follow the convention:
$column['escaped'] == true→{{ $column['text'] }}(HTML-escaped)$column['escaped'] == false→{!! $column['text'] !!}(raw)
The color template has these branches swapped. An attacker who can write an arbitrary string to a color-typed column can inject JavaScript that executes in the browser of any user who views the list — including administrators — with access to their session cookies and CSRF tokens.
Impact
Stored XSS with scope change (attacker context runs in victim's browser). Highest-risk target is an administrator viewing the list view. Exploitability requires the ability to write an unsanitized value into a color-typed column.
Patches
Fixed in 6.8.14 and 7.0.38 by correcting the branch order in color.blade.php. See PR #5992.
Workarounds
Validate stored color values against a strict CSS color grammar (e.g. /^#[0-9a-fA-F]{3,6}$/) at the model layer before data reaches the view.
Credits
Reported by Vishal Shukla (@shukla304) via sechub.dev.
Czego dotyczy
Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.
| Platforma | Paczka | Podatne wersje | Poprawka w wersji |
|---|---|---|---|
| Paczka Composer | backpack/crud | >= 6.0.0, < 6.8.14, >= 7.0.0, < 7.0.38 | 6.8.14, 7.0.38 |
Odnośniki
- Wektor CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N- Słabość (CWE)
CWE-1023, CWE-79- Platforma
- Composer
- Paczka
backpack/crud- Ujawniono
- 20.08.2026
- Aktualizacja
- 11.10.2026 10:22
Źródła i licencje
OSV / GitHub Advisory Database - GHSA-mmg4-322v-6jvc - CC BY 4.0
Historia podatności: backpack/crud
Wszystkie opisane podatności tej paczki (Paczka Composer), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.
- Wszystkich wpisów
- 11
- Pierwsza → ostatnia
- 05.2022 08.2026
- Bez poprawki
- 0
- Wykorzystywana w atakach
- 0
Rozkład istotności
- Wysoka 4
- Średnia 7
Ujawnienia w latach
- 2022: 1
- 2023: 0
- 2024: 0
- 2025: 0
- 2026: 10
-
Laravel Backpack CRUD: Stored XSS in the color column — the `@if($column['escaped'])` branches are inverted ten wpis
Dowiedz się, które podatności dotyczą Twojej aplikacji
Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.