CVE-2024-55661: Laravel/pulse Remote Code Execution Vulnerability

HIGH
Advisory Identifier: GHSA-8vwh-pr89-4mw2
CWE-94
Published
Advisory Summary

CVE-2024-55661 is a HIGH remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Laravel/pulse libraries in the Packagist ecosystem. The issue involves laravel pulse allows remote code execution via unprotected query method. Remediation is available by upgrading affected packages to version 1.3.1.

CVE-2024-55661 at a Glance

CVE Identifier CVE-2024-55661
GHSA Identifier GHSA-8vwh-pr89-4mw2
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Laravel/pulse
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2024-55661

To remediate this vulnerability, upgrade all affected Laravel/pulse dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

laravel/pulse fixed: 1.3.1
Upgrade laravel/pulse to 1.3.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for laravel/pulse

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-55661, inspect your project dependencies for Laravel/pulse:

inspect dependencies for laravel/pulse

Analyze the terminal output to locate any version of Laravel/pulse in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Laravel/pulse, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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 in `Laravel\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: ```php wire:click="remember('\\Illuminate\\Support\\Facades\\Config::all', 'config')" ``` ### Credit Thank you to Jeremy Angele for reporting this vulnerability.

CVE-2024-55661 Affected Laravel/pulse Versions

1 component(s)
Fixed Versions:
1.3.1
Product / Package Ecosystem Affected Versions Fixed Version
laravel/pulse
Packagist
< 1.3.1
1.3.1

References

Frequently Asked Questions

What is CVE-2024-55661?
CVE-2024-55661 is a security vulnerability in Laravel/pulse involving Laravel Pulse Allows Remote Code Execution via Unprotected Query Method under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Laravel/pulse versions are affected?
Affected versions include releases prior to 1.3.1 across affected packages: laravel/pulse.
What version fixes CVE-2024-55661?
Upgrading to 1.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is laravel/pulse affected?
Yes, laravel/pulse is affected in releases prior to 1.3.1. Upgrade your dependency to 1.3.1 or later.
What CWE is associated with CVE-2024-55661?
CVE-2024-55661 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check Packagist dependencies for CVE-2024-55661?
Run the dependency tree command: 'inspect dependencies for laravel/pulse'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8vwh-pr89-4mw2",
  "modified" : "2024-12-17T18:07:21Z",
  "published" : "2024-12-13T20:35:43Z",
  "aliases" : [ "CVE-2024-55661" ],
  "summary" : "Laravel Pulse Allows Remote Code Execution via Unprotected Query Method",
  "details" : "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. \n\n### Impact\n\nAn authenticated user with access to Laravel Pulse dashboard can execute arbitrary code by calling any function or static method that meets the following criteria:\n\n- The callable is a function or static method\n- The callable has no parameters or no strict parameter types\n\n### Vulnerable Components\n\n- The `remember(callable $query, string $key = '')` method in `Laravel\\Pulse\\Livewire\\Concerns\\RemembersQueries`\n- Affects all Pulse card components that use this trait\n\n### Attack Vectors\n\nThe vulnerability can be exploited through Livewire component interactions, for example:\n\n```php\nwire:click=\"remember('\\\\Illuminate\\\\Support\\\\Facades\\\\Config::all', 'config')\"\n```\n\n### Credit\n\nThank you to Jeremy Angele for reporting this vulnerability.\n",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/pulse"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/laravel/pulse/security/advisories/GHSA-8vwh-pr89-4mw2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-55661"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/pulse/commit/d1a5bf2eca36c6e3bedb4ceecd45df7d002a1ebc"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/laravel/pulse"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-12-13T20:35:43Z",
    "nvd_published_at" : "2024-12-13T16:15:27Z"
  }
}