Summary
Laravel Backpack CRUD: SingleBase64Image accepts any base64 payload behind a data:image prefix, SVG-with-script lands on the public disk
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
// 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.
Affected versions
>= 6.0.0, < 6.8.14>= 7.0.0, < 7.0.38
Patched versions
6.8.147.0.38
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.
Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.
CVE-2026-54179 has a CVSS score of 4.4 (Medium). The vector is network-reachable, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (6.8.14, 7.0.38); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
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.
Frequently Asked Questions
- What is CVE-2026-54179? CVE-2026-54179 is a medium-severity cross-site scripting (XSS) vulnerability in backpack/crud (composer), affecting versions >= 6.0.0, < 6.8.14. It is fixed in 6.8.14, 7.0.38. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
- How severe is CVE-2026-54179? CVE-2026-54179 has a CVSS score of 4.4 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of backpack/crud are affected by CVE-2026-54179? backpack/crud (composer) versions >= 6.0.0, < 6.8.14 is affected.
- Is there a fix for CVE-2026-54179? Yes. CVE-2026-54179 is fixed in 6.8.14, 7.0.38. Upgrade to this version or later.
- Is CVE-2026-54179 exploitable, and should I be worried? Whether CVE-2026-54179 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-54179 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-54179?
- Upgrade
backpack/crudto 6.8.14 or later - Upgrade
backpack/crudto 7.0.38 or later
- Upgrade