CVE-2025-54068 Elastic Security · Elastic

Detect Laravel Livewire Code Injection (CVE-2025-54068) in Elastic Security

Detects exploitation of CVE-2025-54068, a code injection vulnerability in Laravel Livewire. This KEV-listed vulnerability allows attackers to inject and execute arbitrary PHP code through Livewire component handling, potentially leading to remote code execution on affected Laravel applications.

MITRE ATT&CK

Tactic
Initial Access Execution Persistence

Elastic Detection Query

Elastic Security (Elastic)
eql
sequence by host.name with maxspan=5m
  [network where event.category == "network" and
   (url.path : "*/livewire/message*" or url.path : "*/livewire/upload-file*") and
   http.request.method == "POST"]
  [process where event.category == "process" and event.type == "start" and
   (process.name in ("php", "php-fpm", "php8.0", "php8.1", "php8.2", "php8.3") or
    process.parent.name in ("php", "php-fpm", "nginx", "apache2", "httpd")) and
   (process.args : ("*eval(*", "*system(*", "*exec(*", "*shell_exec(*", "*base64_decode(*")) or
   (process.name in ("bash", "sh", "dash", "curl", "wget") and
    process.parent.name in ("php", "php-fpm"))]
critical severity high confidence

EQL sequence rule correlating Livewire POST requests with subsequent suspicious PHP process execution, indicating CVE-2025-54068 exploitation leading to command execution.

Data Sources

Elastic Endpoint SecurityFilebeat Web LogsAuditbeat

Required Tables

logs-endpoint.events.network*logs-endpoint.events.process*

False Positives & Tuning

  • PHP processes legitimately spawned by web applications for background jobs
  • Cron-based PHP scripts that happen to execute near Livewire traffic
  • Development workflows using Artisan commands alongside Livewire

Other platforms for CVE-2025-54068


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1CVE-2025-54068 Basic eval() Injection via Livewire Message Endpoint

    Expected signal: HTTP POST to /livewire/message with base64-encoded payload containing system() call; PHP process may log eval() warning; web server logs capture anomalous request body.

  2. Test 2CVE-2025-54068 Shell Command Execution via Livewire Injection

    Expected signal: Process creation event: php or php-fpm spawning /bin/sh with argument 'id > /tmp/pwned'; file creation event at /tmp/pwned; web server access log entry for the crafted POST.

  3. Test 3CVE-2025-54068 Webshell Deployment Simulation

    Expected signal: File creation event for shell.php in public/ directory initiated by php-fpm or web server process; subsequent HTTP GET requests to /shell.php with command parameters.

Unlock Pro Content

Get the full detection package for CVE-2025-54068 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections