Summary
CVE-2026-54182 is a pre-authentication OS command injection vulnerability in the Laravel-Backpack CRUD package, affecting the Stats::makeCurlRequest function used to report usage statistics. The function builds a shell command from the HTTP Host header without adequate sanitization and passes it to exec(), allowing an unauthenticated remote attacker to execute arbitrary operating system commands on the server. The vulnerability carries a CVSS v3.1 base score of 8.1 (High).
Technical details
- Root cause:
BackpackCRUDStats::makeCurlRequest(insrc/Stats.php) constructs a shell command using unescaped, attacker-controlled input derived from the HTTPHostheader, then executes it via PHP’sexec(). - Trigger conditions: The vulnerable code path is reached from
BackpackServiceProvider::boot()on every HTTP request in production environments whereexec()andcurlare available on the server. A built-in 1-in-100 random gate limits how often the code path fires, but an attacker can simply retry requests to reliably trigger it. - Attack vector: Network, no authentication or user interaction required — an attacker only needs to send an HTTP request with a malicious
Hostheader value. - Impact: Successful exploitation results in arbitrary OS command execution with the privileges of the web server process, exposing environment secrets, database credentials, API keys, and filesystem contents, and potentially allowing further data modification or service disruption.
Affected software
- Laravel-Backpack CRUD 4.1.x: versions before 4.1.72
- Laravel-Backpack CRUD 5.x: versions 5.0.0 up to before 5.6.2
- Laravel-Backpack CRUD 6.x: versions 6.0.0 up to before 6.8.13
- Laravel-Backpack CRUD 7.x: versions 7.0.0 up to before 7.0.36
Severity
CVSS v3.1 Base Score: 8.1 (High)
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate: Upgrade Laravel-Backpack CRUD to version 4.1.72, 5.6.2, 6.8.13, or 7.0.36 (or later), depending on the branch in use. The fix replaces the vulnerable shell-based
exec()/curlapproach with Guzzle-based HTTP requests. - If immediate patching is not possible: Validate and restrict the HTTP
Hostheader at the reverse proxy or load balancer level (e.g., allow-list expected hostnames and reject requests with unexpected or malformedHostvalues) to reduce exposure until the upgrade can be applied.

