CVE-2026-54177: Laravel Backpack CRUD HasUploadFields Keeps The Attacker-supplied File Vulnerability

MODERATE
Advisory Identifier: GHSA-8q2w-pv9p-mjvc
CVSS 6.6
CWE-434
Published
Advisory Summary

CVE-2026-54177 is a MODERATE (CVSS 6.6) hasuploadfields keeps the attacker-supplied file vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Laravel Backpack CRUD libraries in the Packagist ecosystem. The issue involves hasuploadfields keeps the attacker-supplied file extension — public-disk uploads of `shell.php` reach the webserver. Remediation is available by upgrading affected packages to version 6.8.14, 7.0.38.

CVE-2026-54177 at a Glance

CVE Identifier CVE-2026-54177
GHSA Identifier GHSA-8q2w-pv9p-mjvc
Severity MODERATE
CVSS v3.1 Base Score 6.6
CWE Classification CWE-434: Unrestricted Upload of File with Dangerous Type
Affected Product Laravel Backpack CRUD
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.6

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

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-54177

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-54177, 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-434: Unrestricted Upload of File with Dangerous Type, where the product allows the upload or transfer of dangerous file types that are automatically processed within its environment. 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 `HasUploadFields` (used via `CrudTrait` on Backpack-managed models) and the `withFiles()` uploader preserve the client-supplied file extension without validation. On installations using a `public` disk with `php artisan storage:link`, this allows an authenticated administrator to upload a file with a server-executable extension that the web server will pass to the PHP interpreter - if no MIME or other type of upload validation is present. ## Details The `uploadFileToDisk` and `uploadMultipleFilesToDisk` methods hash the filename stem but write the client-supplied extension to disk verbatim — no allowlist, blocklist, or MIME check is applied inside the trait itself. The newer `withFiles()` path (via `FileNameGenerator`) resolves the extension from the file's MIME type rather than the client filename, but also does not block server-executable types. Applications that follow the Backpack quickstart without adding explicit `mimes:` or `mimetypes:` validation rules in their form requests are affected. ## Impact An authenticated administrator with access to an upload-enabled CRUD panel, on a site using the `public` disk with web-accessible storage and no MIME type validation, can upload a server-executable file and achieve remote code execution. **Conditions required for exploitation:** - Authenticated admin access to a Backpack CRUD panel - An upload field with no `mimes:` / `mimetypes:` validation rule - The `public` disk in use (standard pattern for web-visible uploads) - `php artisan storage:link` in place - A web server + PHP-FPM stack (default on most hosts) ## Fix A denylist for server-executable extensions has been added to both `HasUploadFields` and `FileNameGenerator`. Image-typed fields now additionally enforce an allowlist. This is defence-in-depth — it does not replace application-level validation. ## Recommended developer action Review all upload fields and add explicit `mimes:` or `mimetypes:` validation in your form requests or field definitions. Refer to the [Backpack field documentation](https://backpackforlaravel.com/docs) for examples. --- Reported by Vishal Shukla ([@shukla304](https://github.com/shukla304)) via sechub.dev.

CVE-2026-54177 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-54177?
CVE-2026-54177 is a security vulnerability in Laravel Backpack CRUD involving HasUploadFields keeps the attacker-supplied file extension — public-disk uploads of `shell.php` reach the webserver under CWE-434: Unrestricted Upload of File with Dangerous Type.
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-54177?
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-54177?
CVE-2026-54177 has a CVSS v3.1 base score of 6.6 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-54177?
CVE-2026-54177 is classified under CWE-434: Unrestricted Upload of File with Dangerous Type (The product allows the upload or transfer of dangerous file types that are automatically processed within its environment.).
How can I check Packagist dependencies for CVE-2026-54177?
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-8q2w-pv9p-mjvc",
  "modified" : "2026-08-20T18:38:34Z",
  "published" : "2026-08-20T18:38:34Z",
  "aliases" : [ "CVE-2026-54177" ],
  "summary" : "Laravel Backpack CRUD: HasUploadFields keeps the attacker-supplied file extension — public-disk uploads of `shell.php` reach the webserver",
  "details" : "## Summary\n\n`HasUploadFields` (used via `CrudTrait` on Backpack-managed models) and the `withFiles()` uploader preserve the client-supplied file extension without validation. On installations using a `public` disk with `php artisan storage:link`, this allows an authenticated administrator to upload a file with a server-executable extension that the web server will pass to the PHP interpreter - if no MIME or other type of upload validation is present.\n\n## Details\n\nThe `uploadFileToDisk` and `uploadMultipleFilesToDisk` methods hash the filename stem but write the client-supplied extension to disk verbatim — no allowlist, blocklist, or MIME check is applied inside the trait itself.\n\nThe newer `withFiles()` path (via `FileNameGenerator`) resolves the extension from the file's MIME type rather than the client filename, but also does not block server-executable types.\n\nApplications that follow the Backpack quickstart without adding explicit `mimes:` or `mimetypes:` validation rules in their form requests are affected.\n\n## Impact\n\nAn authenticated administrator with access to an upload-enabled CRUD panel, on a site using the `public` disk with web-accessible storage and no MIME type validation, can upload a server-executable file and achieve remote code execution.\n\n**Conditions required for exploitation:**\n\n- Authenticated admin access to a Backpack CRUD panel\n- An upload field with no `mimes:` / `mimetypes:` validation rule\n- The `public` disk in use (standard pattern for web-visible uploads)\n- `php artisan storage:link` in place\n- A web server + PHP-FPM stack (default on most hosts)\n\n## Fix\n\nA denylist for server-executable extensions has been added to both `HasUploadFields` and `FileNameGenerator`. Image-typed fields now additionally enforce an allowlist. This is defence-in-depth — it does not replace application-level validation.\n\n## Recommended developer action\n\nReview all upload fields and add explicit `mimes:` or `mimetypes:` validation in your form requests or field definitions. Refer to the [Backpack field documentation](https://backpackforlaravel.com/docs) for examples.\n\n---\n\nReported by Vishal Shukla ([@shukla304](https://github.com/shukla304)) via sechub.dev.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "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-8q2w-pv9p-mjvc"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Laravel-Backpack/CRUD/pull/5993"
  }, {
    "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-434" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-20T18:38:34Z",
    "nvd_published_at" : null
  }
}