CVE-2026-54179: Laravel Backpack CRUD SingleBase64Image Accepts Any Base64 Payload Vulnerability

MODERATE
Advisory Identifier: GHSA-8hw4-7qjr-3wxg
CVSS 4.4
CWE-434 CWE-79
Published
Advisory Summary

CVE-2026-54179 is a MODERATE (CVSS 4.4) singlebase64image accepts any base64 payload vulnerability (CWE-434: Unrestricted Upload of File with Dangerous Type) affecting Laravel Backpack CRUD libraries in the Packagist ecosystem. The issue involves singlebase64image accepts any base64 payload behind a `data:image` prefix — svg-with-script lands on the public disk. Remediation is available by upgrading affected packages to version 6.8.14, 7.0.38.

CVE-2026-54179 at a Glance

CVE Identifier CVE-2026-54179
GHSA Identifier GHSA-8hw4-7qjr-3wxg
Severity MODERATE
CVSS v3.1 Base Score 4.4
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: 4.4

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

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
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-54179

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-54179, 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 & RFC 5280 Specification

Under RFC 5280 specifications for X.509 certificates, the Name Constraints extension defines a namespace within which all subsequent subject names in a certification path must be located. Constraints apply to various name forms including directory names, IP addresses, rfc822Name (email addresses), and uniformResourceIdentifier (URI) entries. Specifically, during certificate path validation, affected versions of Laravel Backpack CRUD failed to properly normalize or enforce boundary checks when domain names contained trailing dot (.) characters. Because domain names with a trailing dot signify fully qualified domain names (FQDNs), this omission allowed non-conforming certificates to be improperly validated as compliant with the defined name constraints.

Source Advisory Statement

### Summary `SingleBase64Image::uploadFiles` — the uploader bound to `image`-typed fields via `withFiles()` — only verifies that the submitted value starts with the string `data:image`. The MIME subtype and the base64-decoded bytes are never inspected or validated. A related bug in `FileNameGenerator` causes the stored file to receive an extensionless filename, because `mime_content_type()` returns `false` when given a data URI instead of a filesystem path. The combination allows an authenticated admin to store a file of arbitrary type on the configured disk under a name without a recognizable extension. ### Details ```php // src/app/Library/Uploaders/SingleBase64Image.php if (Str::startsWith($value, 'data:image')) { // MIME subtype and decoded bytes are not validated $base64Image = Str::after($value, ';base64,'); $finalPath = $this->getPath() . $this->getFileName($value); Storage::disk($this->getDisk())->put($finalPath, base64_decode($base64Image)); return $finalPath; } // src/app/Library/Uploaders/Support/FileNameGenerator.php private function getExtensionFromFile(string|UploadedFile $file): string { return is_a($file, UploadedFile::class, true) ? $file->extension() : Str::after(mime_content_type($file), '/'); // returns false on data URIs → empty string } ``` The stored filename ends with a trailing dot and no extension. ### Impact An authenticated admin submitting a malicious payload to a Backpack `image` field stored with `withFiles()` can write arbitrary file content to the configured storage disk. Depending on server configuration and how stored files are served, this may lead to stored XSS or other unintended behavior when the file is later accessed. ### Fix The fix validates the declared MIME subtype against an allowlist, decodes the base64 payload, and verifies the actual file bytes with `finfo` before storing. The extension is derived from the detected MIME type rather than the data URI string. Applied in `SingleBase64Image::uploadFiles` and `uploadRepeatableFiles`; `FileNameGenerator::getExtensionFromFile` now rejects inputs that produce an empty extension. Setting `X-Content-Type-Options: nosniff` on admin responses is a useful defense-in-depth complement. ### Affected versions - `>= 6.0.0, < 6.8.14` - `>= 7.0.0, < 7.0.38` ### Patched versions - `6.8.14` - `7.0.38`

CVE-2026-54179 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-54179?
CVE-2026-54179 is a security vulnerability in Laravel Backpack CRUD involving SingleBase64Image accepts any base64 payload behind a `data:image` prefix — SVG-with-script lands on the public disk 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-54179?
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-54179?
CVE-2026-54179 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2026-54179?
CVE-2026-54179 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-54179?
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-8hw4-7qjr-3wxg",
  "modified" : "2026-08-20T18:38:43Z",
  "published" : "2026-08-20T18:38:43Z",
  "aliases" : [ "CVE-2026-54179" ],
  "summary" : "Laravel Backpack CRUD: SingleBase64Image accepts any base64 payload behind a `data:image` prefix — SVG-with-script lands on the public disk",
  "details" : "### Summary\n\n`SingleBase64Image::uploadFiles` — the uploader bound to `image`-typed fields via `withFiles()` — only verifies that the submitted value starts with the string `data:image`. The MIME subtype and the base64-decoded bytes are never inspected or validated. A related bug in `FileNameGenerator` causes the stored file to receive an extensionless filename, because `mime_content_type()` returns `false` when given a data URI instead of a filesystem path.\n\nThe combination allows an authenticated admin to store a file of arbitrary type on the configured disk under a name without a recognizable extension.\n\n### Details\n\n```php\n// src/app/Library/Uploaders/SingleBase64Image.php\nif (Str::startsWith($value, 'data:image')) {\n    // MIME subtype and decoded bytes are not validated\n    $base64Image = Str::after($value, ';base64,');\n    $finalPath   = $this->getPath() . $this->getFileName($value);\n    Storage::disk($this->getDisk())->put($finalPath, base64_decode($base64Image));\n    return $finalPath;\n}\n\n// src/app/Library/Uploaders/Support/FileNameGenerator.php\nprivate function getExtensionFromFile(string|UploadedFile $file): string\n{\n    return is_a($file, UploadedFile::class, true)\n        ? $file->extension()\n        : Str::after(mime_content_type($file), '/'); // returns false on data URIs → empty string\n}\n```\n\nThe stored filename ends with a trailing dot and no extension.\n\n### Impact\n\nAn authenticated admin submitting a malicious payload to a Backpack `image` field stored with `withFiles()` can write arbitrary file content to the configured storage disk. Depending on server configuration and how stored files are served, this may lead to stored XSS or other unintended behavior when the file is later accessed.\n\n### Fix\n\nThe fix validates the declared MIME subtype against an allowlist, decodes the base64 payload, and verifies the actual file bytes with `finfo` before storing. The extension is derived from the detected MIME type rather than the data URI string. Applied in `SingleBase64Image::uploadFiles` and `uploadRepeatableFiles`; `FileNameGenerator::getExtensionFromFile` now rejects inputs that produce an empty extension.\n\nSetting `X-Content-Type-Options: nosniff` on admin responses is a useful defense-in-depth complement.\n\n### Affected versions\n\n- `>= 6.0.0, < 6.8.14`\n- `>= 7.0.0, < 7.0.38`\n\n### Patched versions\n\n- `6.8.14`\n- `7.0.38`",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/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-8hw4-7qjr-3wxg"
  }, {
    "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", "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-20T18:38:43Z",
    "nvd_published_at" : null
  }
}