CVE-2026-54181: 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.
Published Aug 20, 2026
Affected packages
backpack/crud
- Ecosystem
- Composer (PHP)
- Affected
- >= 6.0.0, < 6.8.14
- Fixed in
- 6.8.14
- Check
composer show backpack/crud
backpack/crud
- Ecosystem
- Composer (PHP)
- Affected
- >= 7.0.0, < 7.0.38
- Fixed in
- 7.0.38
- Check
composer show backpack/crud
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
Credited to therawdev, tabacitu.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Composer (PHP) vulnerabilities
All Composer (PHP) entriesCVE-2026-54175
Laravel Backpack CRUD: Unverified password change in MyAccountController via mass assignment
high7.6Aug 20, 2026CVE-2026-54176
Laravel Backpack CRUD: MyAccountController allows changing the login email without a current-password check
medium6.5Aug 20, 2026CVE-2026-54177
Laravel Backpack CRUD: HasUploadFields keeps the attacker-supplied file extension — public-disk uploads of `shell.php` reach the webserver
medium6.6Aug 20, 2026CVE-2026-54178
Laravel Backpack CRUD: Arbitrary file deletion via attacker-controlled clear_<attr>[] in HasUploadFields::uploadMultipleFilesToDisk
high8.1No fixAug 20, 2026CVE-2026-54179
Laravel Backpack CRUD: SingleBase64Image accepts any base64 payload behind a `data:image` prefix — SVG-with-script lands on the public disk
medium4.4Aug 20, 2026CVE-2026-54180
Laravel Backpack CRUD: CRUD panel query scopes are not enforced on Update, Delete, and Reorder (cross-tenant IDOR)
high7.6Aug 20, 2026
