SentinelOne
CVE Vulnerability Database
Vulnerability Database/CVE-2025-54068

CVE-2025-54068: Laravel Livewire RCE Vulnerability

CVE-2025-54068 is a remote code execution vulnerability in Laravel Livewire v3 through v3.6.3 that allows unauthenticated attackers to execute arbitrary commands. This article covers technical details, affected versions, and mitigation.

Updated:

CVE-2025-54068 Overview

CVE-2025-54068 is a critical remote code execution vulnerability in Laravel Livewire v3, a popular full-stack framework for building dynamic Laravel applications. The vulnerability exists in versions up to and including v3.6.3 and stems from improper handling of component property updates during the hydration process. This flaw allows unauthenticated attackers to achieve remote command execution when certain Livewire components are mounted and configured in specific ways.

Critical Impact

Unauthenticated remote code execution allowing attackers to completely compromise Laravel applications using vulnerable Livewire v3 components without any user interaction required.

Affected Products

  • Laravel Livewire v3.0 through v3.6.3
  • Applications using Livewire v3 with specifically configured mounted components

Discovery Timeline

  • 2025-07-17 - CVE-2025-54068 published to NVD
  • 2025-08-27 - Last updated in NVD database

Technical Details for CVE-2025-54068

Vulnerability Analysis

This vulnerability is classified as CWE-94 (Improper Control of Generation of Code - Code Injection). The flaw resides in how Livewire v3 handles the hydration of component property updates. During the component lifecycle, Livewire processes incoming data to restore component state, but insufficient validation in this hydration process allows malicious payloads to be injected and executed.

The vulnerability is unique to the Livewire v3 architecture and does not affect prior major versions (v1 or v2). This is significant because Livewire v3 introduced substantial architectural changes to improve performance and developer experience, but these changes inadvertently created this security gap in the property hydration mechanism.

The network-accessible nature of this vulnerability, combined with no authentication requirements and no user interaction needed, makes it particularly dangerous for internet-facing Laravel applications.

Root Cause

The root cause lies in the HandleComponents.php mechanism where property updates are hydrated without proper validation. When component properties are updated via HTTP requests, the framework failed to properly sanitize and validate synthetic tuples before processing them through the property synthesizer. This allowed attackers to craft malicious payloads that would be executed during the hydration process.

Attack Vector

The attack is network-based and can be executed remotely without authentication. An attacker can craft malicious HTTP requests targeting Livewire component endpoints. When a vulnerable component is mounted with certain configurations, the attacker's payload is processed through the flawed hydration logic, resulting in arbitrary code execution on the server.

The attack does not require any user interaction or special privileges, making it exploitable in automated attack scenarios. However, exploitation does require that a Livewire component be mounted and configured in a particular way, which may limit the attack surface in some applications.

php
// Security patch in src/Mechanisms/HandleComponents/HandleComponents.php
// Source: https://github.com/livewire/livewire/commit/ef04be759da41b14d2d129e670533180a44987dc

         });
     }
 
+    protected function hydratePropertyUpdate($valueOrTuple, $context, $path, $raw)
+    {
+        if (! Utils::isSyntheticTuple($value = $tuple = $valueOrTuple)) return $value;
+
+        [$value, $meta] = $tuple;
+
+        // Nested properties get set as `__rm__` when they are removed. We don't want to hydrate these.
+        if ($this->isRemoval($value) && str($path)->contains('.')) {
+            return $value;
+        }
+
+        $synth = $this->propertySynth($meta['s'], $context, $path);
+
+        return $synth->hydrate($value, $meta, function ($name, $child) use ($context, $path, $raw) {
+            return $this->hydrateForUpdate($raw, "{$path}.{$name}", $child, $context);
+        });
+    }
+
     protected function render($component, $default = null)
     {
         if ($html = store($component)->get('skipRender', false)) {

Source: GitHub Commit Change

The patch introduces a dedicated hydratePropertyUpdate() method that properly validates synthetic tuples and handles nested property removals safely before processing through the property synthesizer.

Detection Methods for CVE-2025-54068

Indicators of Compromise

  • Unusual HTTP POST requests to Livewire component endpoints containing malformed or suspicious property update payloads
  • Unexpected process spawning or command execution originating from PHP/web server processes
  • Anomalous outbound network connections from the web application server
  • Web server logs showing requests with encoded or obfuscated payloads targeting /livewire/ endpoints

Detection Strategies

  • Monitor web application firewall (WAF) logs for suspicious requests targeting Livewire endpoints with unusual payload structures
  • Implement application-level logging to track Livewire component hydration events and flag anomalous property updates
  • Deploy runtime application self-protection (RASP) solutions to detect code injection attempts during request processing
  • Use SentinelOne's Singularity platform to detect and block unauthorized code execution attempts on application servers

Monitoring Recommendations

  • Enable verbose logging for Livewire component lifecycle events in staging and production environments
  • Set up alerts for any process execution anomalies on web server hosts running Laravel applications
  • Monitor for unexpected file system changes or creation of new PHP files in application directories
  • Implement network egress monitoring to detect potential data exfiltration following successful exploitation

How to Mitigate CVE-2025-54068

Immediate Actions Required

  • Upgrade Laravel Livewire to version v3.6.4 or later immediately
  • Audit all Livewire components in your application to understand potential exposure
  • Review application logs for any signs of exploitation attempts prior to patching
  • Consider temporarily disabling or restricting access to applications using vulnerable Livewire versions if immediate patching is not possible

Patch Information

Laravel has released Livewire v3.6.4 which addresses this vulnerability. The patch introduces the hydratePropertyUpdate() method with proper validation of synthetic tuples and safe handling of nested property updates. All users running Livewire v3 are strongly encouraged to upgrade immediately.

Update via Composer:

bash
composer require livewire/livewire:^3.6.4

For detailed information about the security fix, refer to the GitHub Security Advisory GHSA-29cq-5w36-x7w3 and the GitHub Release v3.6.4.

Workarounds

  • No known workarounds are available for this vulnerability - upgrading to v3.6.4 or later is the only remediation
  • As a temporary measure, consider placing vulnerable applications behind a web application firewall with strict input validation rules
  • Restrict network access to Livewire endpoints to trusted IP ranges if the application does not require public access
  • Monitor application behavior closely while preparing for the upgrade
bash
# Upgrade Livewire to the patched version
composer require livewire/livewire:^3.6.4

# Verify the installed version
composer show livewire/livewire | grep versions

# Clear application cache after upgrade
php artisan cache:clear
php artisan view:clear
php artisan config:clear

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.