/

CVE-2026-23524

Severity:

CRITICAL RISK

(9.8)

Unsafe Deserialization in Laravel Reverb Redis Scaling

CVE-2026-23524

Analyzed

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Laravel Reverb versions 1.6.3 and below deserialize data from Redis using PHP's unserialize() without restricting which classes can be instantiated, enabling unsafe object construction.

When horizontal scaling is enabled and an attacker can influence Redis contents, this flaw can lead to remote code execution within the Reverb process, especially in deployments where Redis is exposed without strong access controls.

Affected context

This vulnerability affects Laravel applications using Reverb as a real-time WebSocket backend when:

  • Reverb horizontal scaling is enabled (REVERB_SCALING_ENABLED=true)
  • Redis is used as the channel backend for scaling communication
  • Data from Redis is consumed and passed directly to unserialize() in the Reverb process

The risk is higher in environments where Redis is reachable over the network without strict authentication or is shared between multiple services or tenants.

Exploit preconditions

  • Attack surface: Network-accessible Redis instance used by Laravel Reverb for scaling.
  • Required access: Ability to write or manipulate messages in the Redis channel consumed by Reverb (e.g., unauthenticated or weakly protected Redis, compromised co-tenant service, or internal attacker with Redis access).
  • Trigger point: Reverb node reads messages from Redis and calls unserialize() on attacker-controlled data as part of its inter-node communication logic.
  • Why exploitation is possible: unserialize() is invoked on untrusted data without a class whitelist or deserialization constraints, allowing instantiation of gadget classes that execute attacker-controlled behavior during object construction or destruction.

Why this happens

The underlying issue is an unsafe deserialization pattern in the Reverb scaling implementation.

Data read from Redis is treated as trusted and passed directly into PHP's unserialize() without using safer alternatives (such as JSON-based formats) or restricting which classes may be created.

This maps to CWE-502: Deserialization of Untrusted Data, where untrusted input is deserialized into live objects that may contain "magic" methods (constructors, destructors, or hooks) that can be abused as gadgets to achieve arbitrary code execution.

Potential impact

  • Remote code execution within the PHP process running Laravel Reverb.
  • Full compromise of the Reverb node, including the ability to read or modify in-memory secrets and configuration.
  • Interception, modification, or injection of real-time WebSocket messages, leading to data tampering or session abuse.
  • Lateral movement within the hosting environment or underlying infrastructure, depending on the privileges of the compromised process.
  • Denial of service by causing crashes, resource exhaustion, or unstable behavior through malicious payloads.

General mitigation guidance

Long-term mitigation focuses on eliminating unsafe deserialization and reducing trust in infrastructure messaging channels:

  • Replace PHP unserialize() for inter-node communication with safer, data-only formats (e.g., JSON, MessagePack) that do not instantiate arbitrary classes.
  • Where deserialization is unavoidable, use constrained mechanisms (such as class whitelists or purpose-specific DTOs) instead of arbitrary object graphs, and avoid invoking magic methods on untrusted data paths.
  • Treat Redis and other broker backends as untrusted transport layers; design protocols so that messages are validated and parsed defensively before use.
  • Apply least-privilege principles to the Reverb process and associated credentials so that a compromise has limited blast radius.
  • Isolate messaging infrastructure on private networks with strong authentication and network segmentation, reducing exposure to untrusted write access.

How teams detect issues like this

Typical detection approaches include:

  • Static analysis rules that flag use of unserialize() on data originating from external systems such as Redis, message queues, or HTTP input, especially without a defined class whitelist.
  • Code review checklists that call out serialization/deserialization logic as high-risk, requiring reviewers to verify input trust boundaries and object instantiation constraints.
  • Runtime monitoring and logging around deserialization code paths to detect anomalous payload shapes, unexpected class names, or spikes in deserialization failures.
  • Security policy enforcement in CI/CD (using SAST or custom linters) to prevent new unsafe deserialization code from being merged and to highlight integrations that assume "trusted" infrastructure data.

Sources

SourceLink
cwe.mitre.orgcwe.mitre.org/data/definitions/502.html
github.comgithub.com/laravel/reverb/commit/9ec26f8ffbb701f84920dd0bb9781a1797591f1a
github.comgithub.com/laravel/reverb/releases/tag/v1.7.0
github.comgithub.com/laravel/reverb/security/advisories/GHSA-m27r-m6rx-mhm4
laravel.comlaravel.com/docs/12.x/reverb#scaling

Frequently asked

questions

It can be, if an attacker can reach and write to the Redis instance used by Laravel Reverb—especially in deployments where Redis is exposed without authentication or is reachable from untrusted networks. If Redis access is tightly restricted, the practical exploitability is reduced.

The attacker needs the ability to influence or inject data into the Redis channel that Reverb uses for scaling communication. This might come from direct network access to Redis, a compromised internal service that can publish messages, or misconfigured infrastructure that exposes Redis more broadly than intended.

The most robust fix is to remove unsafe deserialization entirely from the communication path: use data-only formats (like JSON) and avoid unserialize() on untrusted data. If deserialization must remain, enforce strict class whitelists and avoid any gadgets with side effects during object lifecycle operations.

Prevent them by adopting design rules that treat all infrastructure messaging (Redis, queues, caches) as untrusted input, banning generic object deserialization for cross-service communication, and enforcing these rules with code review and automated static analysis. Additionally, keep infrastructure components strongly authenticated, network-isolated, and minimally exposed to limit who can write data into critical channels.

Find out what's already
exploitable in your codebase.