CVE-2026-54181: Laravel Backpack CRUD Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-mmg4-322v-6jvc
CVSS 5.4
CWE-1023 CWE-79
Published
Advisory Summary

CVE-2026-54181 is a MODERATE (CVSS 5.4) cross-site scripting vulnerability (CWE-1023: Incomplete Comparison with Missing Factors) affecting Laravel Backpack CRUD libraries in the Packagist ecosystem. The issue involves stored xss in the color column — the `@if($column['escaped'])` branches are inverted. Remediation is available by upgrading affected packages to version 6.8.14, 7.0.38.

CVE-2026-54181 at a Glance

CVE Identifier CVE-2026-54181
GHSA Identifier GHSA-mmg4-322v-6jvc
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-1023: Incomplete Comparison with Missing Factors
Affected Product Laravel Backpack CRUD
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.4

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
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-2026-54181

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

backpack/crud fixed: 6.8.14
Upgrade backpack/crud to 6.8.14
backpack/crud fixed: 7.0.38
Upgrade backpack/crud to 7.0.38
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 backpack/crud

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-54181, inspect your project dependencies for Laravel Backpack CRUD:

inspect dependencies for backpack/crud

Analyze the terminal output to locate any version of Laravel Backpack CRUD in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.8.14), 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-1023: Incomplete Comparison with Missing Factors, where the product performs a comparison between entities that must consider multiple factors or characteristics of each entity, but the comparison does not include one or more of these factors. In Laravel Backpack CRUD, 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 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](https://github.com/shukla304)) via sechub.dev.

CVE-2026-54181 Affected Laravel Backpack CRUD Versions

2 component(s)
Fixed Versions:
6.8.147.0.38
Product / Package Ecosystem Affected Versions Fixed Version
backpack/crud
Packagist
≥ 6.0.0
< 6.8.14
6.8.14
backpack/crud
Packagist
≥ 7.0.0
< 7.0.38
7.0.38

References

Frequently Asked Questions

What is CVE-2026-54181?
CVE-2026-54181 is a security vulnerability in Laravel Backpack CRUD involving Stored XSS in the color column — the `@if($column['escaped'])` branches are inverted under CWE-1023: Incomplete Comparison with Missing Factors.
Which Laravel Backpack CRUD versions are affected?
Affected versions include releases prior to 6.8.14, 7.0.38 across affected packages: backpack/crud.
What version fixes CVE-2026-54181?
Upgrading to 6.8.14, 7.0.38 (or the latest patched release for your respective branch) resolves the vulnerability.
Is backpack/crud affected?
Yes, backpack/crud is affected in releases prior to 6.8.14, 7.0.38. Upgrade your dependency to 6.8.14, 7.0.38 or later.
What is the CVSS score of CVE-2026-54181?
CVE-2026-54181 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-54181?
CVE-2026-54181 is classified under CWE-1023: Incomplete Comparison with Missing Factors (The product performs a comparison between entities that must consider multiple factors or characteristics of each entity, but the comparison does not include one or more of these factors.).
How can I check Packagist dependencies for CVE-2026-54181?
Run the dependency tree command: 'inspect dependencies for backpack/crud'. 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-mmg4-322v-6jvc",
  "modified" : "2026-08-20T18:38:50Z",
  "published" : "2026-08-20T18:38:50Z",
  "aliases" : [ "CVE-2026-54181" ],
  "summary" : "Laravel Backpack CRUD: Stored XSS in the color column — the `@if($column['escaped'])` branches are inverted",
  "details" : "## 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "backpack/crud"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "6.0.0"
      }, {
        "fixed" : "6.8.14"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "backpack/crud"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0"
      }, {
        "fixed" : "7.0.38"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Laravel-Backpack/CRUD/security/advisories/GHSA-mmg4-322v-6jvc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Laravel-Backpack/CRUD"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Laravel-Backpack/CRUD/releases/tag/6.8.14"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Laravel-Backpack/CRUD/releases/tag/7.0.38"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1023", "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-20T18:38:50Z",
    "nvd_published_at" : null
  }
}