Skip to content
RCE Write-up Advanced

Livewire : exécution de commandes à distance via unmarshaling

Livewire's hydration mechanism deserialises component state from client-supplied JSON, and the checksum protecting it is keyed with the application's APP_KEY. An attacker who knows that key can forge a snapshot that instantiates arbitrary classes and triggers PHP magic methods, leading to remote command execution; the researchers also found an unauthenticated variant that abuses the updates field and weak PHP typing to bypass the checksum.

Webmaster Follow

Published on synacktiv.com

Rédigé par Rémi Matasse, Pierre Martin - 23/12/2025 - dans Pentest - Téléchargement

Webmaster, on synacktiv.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the hydration step trusts class names and metadata taken from the client snapshot and instantiates them without an allow-list, so attacker-chosen classes and their magic methods run on the server.

Impact

An attacker with the APP_KEY could execute arbitrary code and commands on the server, and the researchers say a second flaw may allow the same without authentication, though the article does not show that chain end to end.

What the attacker needed

Knowledge of the app's APP_KEY; ability to send requests to the update endpoint

How it was found

  1. Obtain the application's APP_KEY, which is used to compute the snapshot checksum.
  2. Craft a snapshot whose data field contains a synthesizer tuple naming a chosen class, such as the collection synthesizer with a class that takes an array.
  3. Nest further synthesizer tuples so the recursive hydration instantiates the gadget classes and sets their properties.
  4. Send the forged snapshot in a POST request to the Livewire update endpoint so the server rehydrates it and the magic methods fire.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Livewire is a tool that lets a Laravel website keep parts of a page in sync with the server. To do that, the browser sends back a saved copy of the page's state, and the server rebuilds objects from it. If an attacker can tamper with that saved state, the server can be tricked into creating objects the developer never intended, and some of those objects run code when they are created or destroyed.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Webmaster

View all

4 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.