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.
Rédigé par Rémi Matasse, Pierre Martin - 23/12/2025 - dans Pentest - Téléchargement
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
- Obtain the application's APP_KEY, which is used to compute the snapshot checksum.
- 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.
- Nest further synthesizer tuples so the recursive hydration instantiates the gadget classes and sets their properties.
- 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.