{"id":"CVE-2026-54181","aliases":["CVE-2026-54181","GHSA-mmg4-322v-6jvc"],"related":[],"kind":"vulnerability","state":"published","title":"backpack/crud: Stored XSS in the color column — the `@if($column['escaped'])` branches are inverted","summary":"backpack/crud provides Create, Read, Update & Delete (CRUD) functions for Backpack, a collection of Laravel packages that help users build custom administration panels. From 6.0.0 until 6.8.14 and 7.0.38, src/resources/views/crud/columns/color.blade.php inverts the escaped and raw rendering branches controlled by $column['escaped'], which defaults to true, causing $column['text'] to be rendered unescaped by default. An attacker who can store an unsanitized value in a color column can execute script in the browser of a user who views the CRUD list, including an administrator, with access to the victim's session-backed application capabilities. Exploitation requires write access to the stored color value and a victim viewing the list. This issue is fixed in versions 6.8.14 and 7.0.38.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"backpack/crud provides Create, Read, Update & Delete (CRUD) functions for Backpack, a collection of Laravel packages that help users build custom administration panels. From 6.0.0 until 6.8.14 and 7.0.38, src/resources/views/crud/columns/color.blade.php inverts the escaped and raw rendering branches controlled by $column['escaped'], which defaults to true, causing $column['text'] to be rendered unescaped by default. An attacker who can store an unsanitized value in a color column can execute script in the browser of a user who views the CRUD list, including an administrator, with access to the victim's session-backed application capabilities. Exploitation requires write access to the stored color value and a victim viewing the list. This issue is fixed in versions 6.8.14 and 7.0.38.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nThe 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.\n\n## Details\n\nAll other column templates in `src/resources/views/crud/columns/` follow the convention:\n- `$column['escaped'] == true` → `{{ $column['text'] }}` (HTML-escaped)\n- `$column['escaped'] == false` → `{!! $column['text'] !!}` (raw)\n\nThe `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.\n\n## Impact\n\nStored 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.\n\n## Patches\n\nFixed in **6.8.14** and **7.0.38** by correcting the branch order in `color.blade.php`. See PR #5992.\n\n## Workarounds\n\nValidate 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.\n\n## Credits\n\nReported by Vishal Shukla ([@shukla304](https://github.com/shukla304)) via sechub.dev.","format":"markdown","source":"ghsa"}],"published":"2026-08-20T18:38:50.000Z","modified":"2026-09-30T17:51:56.193Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"}],"cwes":["CWE-79","CWE-1023"],"affected":[{"ranges":[{"version":">= 6.0.0, < 6.8.14","status":"affected"},{"version":">= 7.0.0, < 7.0.38","status":"affected"}],"vendor":"Laravel-Backpack","product":"CRUD","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0","status":"affected","fixed":"6.8.14"}],"ecosystem":"Packagist","package":"backpack/crud","purl":"pkg:composer/backpack/crud","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.0.38"}],"ecosystem":"Packagist","package":"backpack/crud","purl":"pkg:composer/backpack/crud","source":"ghsa"}],"references":[{"url":"https://github.com/Laravel-Backpack/CRUD/security/advisories/GHSA-mmg4-322v-6jvc","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/Laravel-Backpack/CRUD/pull/5992","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/Laravel-Backpack/CRUD/pull/5994","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/Laravel-Backpack/CRUD/commit/608652b1020ba274781f222d2959d7780a559a08","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/Laravel-Backpack/CRUD/commit/76c3a6e50e3fbd6d5f633208da5b04acb8322969","tags":["x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/Laravel-Backpack/CRUD/releases/tag/6.8.14","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/Laravel-Backpack/CRUD/releases/tag/7.0.38","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/Laravel-Backpack/CRUD","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-09-14T19:20:42.379Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-54181","url":"https://www.cve.org/CVERecord?id=CVE-2026-54181","licence":"CVE Terms of Use","modified":"2026-09-14T20:05:31.606Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mmg4-322v-6jvc","url":"https://github.com/advisories/GHSA-mmg4-322v-6jvc","licence":"CC-BY-4.0","modified":"2026-08-20T18:48:09.590Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-54181","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54181","licence":"Public domain","modified":"2026-09-30T17:51:56.193Z"}],"updatedAt":"2026-11-25T22:59:38.329Z","epss":{"score":0.00296,"percentile":0.23954,"date":"2026-12-01T12:00:22.000Z"}}