Laravel Pulse Allows Remote Code Execution via Unprotected Query Method
The advisory, in context
A vulnerability has been discovered in Laravel Pulse that could allow remote code execution through the public remember() method in the Laravel\Pulse\Livewire\Concerns\RemembersQueries trait. This method is accessible via Livewire components and can be exploited to call arbitrary callables within the application.
Impact
An authenticated user with access to Laravel Pulse dashboard can execute arbitrary code by calling any function or static method that meets the following criteria:
- The callable is a function or static method
- The callable has no parameters or no strict parameter types
Vulnerable Components
- The
remember(callable $query, string $key = '')method inLaravel\Pulse\Livewire\Concerns\RemembersQueries - Affects all Pulse card components that use this trait
Attack Vectors
The vulnerability can be exploited through Livewire component interactions, for example:
wire:click="remember('\\Illuminate\\Support\\Facades\\Config::all', 'config')"
Credit
Thank you to Jeremy Angele for reporting this vulnerability.
Affected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
Earlier releases before 1.3.1
Fixed in 1.3.1
27 explicitly affected versions
v1.0.0, v1.0.0-beta1, v1.0.0-beta10, v1.0.0-beta11, v1.0.0-beta12, v1.0.0-beta13, v1.0.0-beta14, v1.0.0-beta15, v1.0.0-beta16, v1.0.0-beta2, v1.0.0-beta3, v1.0.0-beta4, v1.0.0-beta5, v1.0.0-beta6, v1.0.0-beta7, v1.0.0-beta8, v1.0.0-beta9, v1.1.0, v1.2.0, v1.2.1, v1.2.2, v1.2.3, v1.2.4, v1.2.5, v1.2.6, v1.2.7, v1.3.0
View affected-version evidence
{
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.3.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"v1.0.0",
"v1.0.0-beta1",
"v1.0.0-beta10",
"v1.0.0-beta11",
"v1.0.0-beta12",
"v1.0.0-beta13",
"v1.0.0-beta14",
"v1.0.0-beta15",
"v1.0.0-beta16",
"v1.0.0-beta2",
"v1.0.0-beta3",
"v1.0.0-beta4",
"v1.0.0-beta5",
"v1.0.0-beta6",
"v1.0.0-beta7",
"v1.0.0-beta8",
"v1.0.0-beta9",
"v1.1.0",
"v1.2.0",
"v1.2.1",
"v1.2.2",
"v1.2.3",
"v1.2.4",
"v1.2.5",
"v1.2.6",
"v1.2.7",
"v1.3.0"
]
}