Picture a small SaaS built on Laravel and Livewire. Every customer gets a subdomain, acme.example.com, globex.example.com. The route file says “this page only answers on a tenant domain, and only if the user is allowed to edit the post”. The route carries a can:update,post rule, and everybody sleeps well because the rule sits right there on the route.
Then a Livewire advisory lands, and it says that in one specific setup the rule on the route is not applied to the buttons on the page. Not on the first page load. On the follow-up requests that Livewire sends when someone clicks, types, or saves.
That is the part worth a careful read, and it is also the part that needs three conditions to be true at once. Plenty of apps will answer “no” to at least one of them. The useful work today is finding out which way yours goes, in about ten minutes, without panic.
The question is not whether the advisory sounds scary. It is whether your own repo has all three conditions, and whether the permission check lives only on the route or also inside the action that changes data.
What the advisory says, in plain words
I read the advisory page on GitHub on Nov 23 at about 08:00 Jakarta time. It is titled “Changing the Host can bypass Livewire persistent middleware”, published by the Livewire maintainer on Nov 21, 2026. I cross-checked the version numbers against the GitHub releases and the Composer package list.
| Fact | What the page says |
|---|---|
| Severity | Moderate, CVSS 3.1 base score 6.8 (network, high attack complexity, low privileges, no user interaction) |
| CVE | No known CVE |
| Affected versions | >= 3.7.4, < 3.8.12 and >= 4.0.0, < 4.4.9 |
| Patched versions | 3.8.12 and 4.4.9 |
| Impact in the advisory’s words | “bypass persistent route middleware on component updates in specific scenarios”, including “bypasses of route-level authorization and tenant isolation” |
| Release notes for both patches | “Includes security fixes and reliability improvements. Updating is recommended.” and “Refresh already-open pages after deploying the update.” |
The advisory then lists exactly when an app is affected. All three at once:
- A component is rendered on a domain-constrained route.
- Access control relies on Livewire’s persistent middleware.
- The Livewire update endpoint is available through another host served by the same application.
It adds one more sentence that matters for how seriously to take it: “Exploitation requires a valid signed component snapshot but does not require the snapshot to be modified.” So this is not a forged-payload story. It is a normal page, loaded normally, followed by an update that arrives on a different hostname.
The advisory credits an automated scanner for the report. That is not a reason to rank the issue up or down. It is only a reminder that this class of bug, “a rule was applied on the way in and quietly not applied on the way back”, is now cheap to find, so expect more of them across every framework.
First, what “persistent middleware” actually is
If you have never typed addPersistentMiddleware, you are still using the feature. The Livewire docs explain it with a route like this:
1Route::livewire('/post/{post}', App\Livewire\UpdatePost::class)
2 ->middleware('can:update,post');
When the page loads, Laravel runs can:update,post. If you may not edit the post, you never see the page. But a Livewire page keeps talking to the server after it loads: every wire:click, every wire:model.live round trip is a new request to Livewire’s update endpoint. That request does not go to your route. So Livewire remembers which middleware ran on the first load and re-applies it to the follow-ups. That is “persistent middleware”, and the docs say it protects you when “the authorization rules or user permissions have changed after the initial page-load”.
By default Livewire re-applies a fixed list: the Sanctum and Jetstream session middleware, AuthenticateWithBasicAuth, SubstituteBindings, RedirectIfAuthenticated, Authenticate, and Authorize. If your own middleware is not on that list, you register it yourself in a service provider:
1// app/Providers/AppServiceProvider.php
2use Livewire\Livewire;
3
4public function boot(): void
5{
6 Livewire::addPersistentMiddleware([
7 \App\Http\Middleware\EnsureUserHasRole::class,
8 ]);
9}
Two practical notes from the docs. Persistent middleware does not take arguments in that list, so AuthorizeResource::class.':admin' is the wrong shape. And because auth and can: map to Authenticate and Authorize, a plain ->middleware('auth') or ->middleware('can:update,post') on a Livewire route already counts as persistent middleware. You do not need to have written a line of Livewire-specific code to be in condition 2.
Where it went wrong, in one picture

The advisory’s “Details” paragraph says this, and I have kept it close to the original:
- When a component is rendered, Livewire stores the original request path and method in the component snapshot, so persistent middleware can be re-applied later.
- It did not store the original host or the resolved route.
- On an update, Livewire rebuilds the original request from the stored path and method, but keeps the host from the update request.
- If that update came in through a different host, the original domain-constrained route may not match. Livewire treats “no route matched” as “no route”, so the action runs without the persistent middleware the original page had.
Read that last line twice. The failure is not “middleware ran and said yes”. It is “middleware never ran”. Nothing logs a denied request, because nothing was denied.
What the patch changes, read straight from the source
I do not trust a changelog that says “security fixes and reliability improvements”, so I looked at the code. The GitHub compare view between v3.8.11 and v3.8.12 shows the interesting change in one file, src/Mechanisms/PersistentMiddleware/PersistentMiddleware.php. The commit message for the core change is “Reject Livewire updates with mismatched route context”. I also fetched the same file at tag v4.4.9 and found the same logic, and at v4.4.8, where the new route-context function is absent.
In plain words, after the patch:
- Every snapshot now also records the request’s origin (scheme plus host) and a small route context (the route’s URI and its domain).
- On an update, if the snapshot is missing those fields or they are the wrong type, Livewire answers 404.
- If the origin of the update request is not the origin the page was rendered on, Livewire answers 404.
- If the route that matches now is not the route the page was rendered on, Livewire answers 404.
- A page rendered without any route (an error page, for example) is still allowed to update, as long as it also matches no route now. That is a second small commit, “Keep updates working for components rendered without a route”.
Two things follow from that reading. They are my inference from the code, not something I ran.
First, the release note “Refresh already-open pages after deploying the update” makes sense. A page opened before your deploy carries an old snapshot without the new fields, and the new code answers 404 to that. So a deploy in the middle of the working day will make some users see a failed click until they reload. Plan the deploy accordingly.
Second, the patch makes the page and its updates share one origin. If your setup renders a page on one hostname and sends updates to another on purpose, expect a 404 after the bump. That is also why one of the Monday steps below is “open the app on every hostname you serve”.
Three questions, then the script
Here are the three questions in the order that rules most apps out the fastest.
Question 1: which Livewire do you run? Read it from composer.lock, not from composer.json, because ^3.5 in the manifest says nothing about what is installed.
1composer show livewire/livewire | head -n 4
2# or, without running PHP:
3grep -A3 '"name": "livewire/livewire"' composer.lock
Below 3.7.4 is outside the advisory’s range. From 3.7.4 up to 3.8.11, or from 4.0.0 up to 4.4.8, is inside it. 3.8.12 and 4.4.9 or later are patched.
Question 2: does any route have a domain constraint? Search routes/, and also your providers and bootstrap/, because route groups sometimes live there. You are looking for ->domain( and Route::domain(.
Question 3: do you rely on route middleware for access? That means auth, can:..., your own EnsureUserHasRole, anything you would call “the permission check”. If a Livewire page sits behind it, you are leaning on persistent middleware whether or not you know the name.
A “yes” on all three still does not prove you are affected. The advisory has a fourth part, “available through another host”, and that part is server configuration, not code. In a wildcard-subdomain SaaS, a lot of hostnames can reach the same app. Whether one of them reaches the Livewire update endpoint is a question for your web server and DNS, and no grep over PHP answers it.
So I wrote a read-only script that answers the first three and prints the fourth as a reminder. It reads files, changes nothing, and needs only Python 3:
1#!/usr/bin/env python3
2"""Three-question Livewire check. Reads files only; changes nothing.
3Usage: python3 livewire-host-check.py /path/to/laravel-app
4Advisory: GHSA-vw9g-2c4c-g767 (affected >=3.7.4,<3.8.12 and >=4.0.0,<4.4.9)."""
5import json
6import re
7import sys
8from pathlib import Path
9
10root = Path(sys.argv[1] if len(sys.argv) > 1 else ".")
11
12
13def ver(s):
14 return tuple(int(x) for x in re.findall(r"\d+", s)[:3])
15
16
17def lock_version():
18 lock = root / "composer.lock"
19 if not lock.exists():
20 return None
21 data = json.loads(lock.read_text())
22 for pkg in data.get("packages", []) + data.get("packages-dev", []):
23 if pkg["name"] == "livewire/livewire":
24 return pkg["version"].lstrip("v")
25 return None
26
27
28def grep(pattern, folders):
29 rx = re.compile(pattern)
30 hits = []
31 for folder in folders:
32 base = root / folder
33 if not base.exists():
34 continue
35 for f in base.rglob("*.php"):
36 for n, line in enumerate(f.read_text(errors="ignore").splitlines(), 1):
37 if rx.search(line):
38 hits.append(f"{f.relative_to(root)}:{n}: {line.strip()}")
39 return hits
40
41
42v = lock_version()
43print(f"app: {root}")
44if v is None:
45 print("Q1 version : livewire/livewire not found in composer.lock -> stop, nothing to check")
46 sys.exit(0)
47t = ver(v)
48if t < (3, 7, 4):
49 q1 = "below 3.7.4: outside the advisory's affected range"
50elif t < (3, 8, 12):
51 q1 = "INSIDE the affected range (3.7.4 up to 3.8.11): update to 3.8.12 or later 3.x"
52elif t[0] == 3:
53 q1 = "patched (3.8.12 or later)"
54elif t < (4, 4, 9):
55 q1 = "INSIDE the affected range (4.0.0 up to 4.4.8): update to 4.4.9 or later"
56else:
57 q1 = "patched (4.4.9 or later)"
58print(f"Q1 version : {v} -> {q1}")
59
60dom = grep(r"->domain\(|Route::domain\(", ["routes", "app", "bootstrap"])
61print(f"Q2 domain routes : {len(dom)} line(s)")
62for h in dom[:5]:
63 print(" " + h)
64
65pm = grep(r"addPersistentMiddleware|setUpdateRoute", ["app", "bootstrap", "config", "routes"])
66# Livewire persists auth-style route middleware by default (docs list Authenticate, Authorize, ...)
67mw = grep(r"middleware\(.*(auth|can:|Authenticate|Authorize)", ["routes"])
68print(f"Q3 persisted middleware : {len(pm)} custom line(s), {len(mw)} default-persisted route line(s)")
69for h in (pm + mw)[:5]:
70 print(" " + h)
71
72th = grep(r"trustHosts|TrustHosts", ["app", "bootstrap"])
73print(f"info trusted hosts : {'configured' if th else 'not configured (Laravel answers any Host)'}")
74
75inside = "INSIDE" in q1
76print("verdict :", end=" ")
77if inside and dom and (pm or mw):
78 print("all three answers are yes -> read the advisory conditions, then update and move the check into the action")
79elif inside:
80 print("in range, but not every condition shows up in code -> still update; keep the action-level authorize() anyway")
81else:
82 print("not in the affected range")
83print("not checked by this script: whether a second hostname reaches the same app (that is server config)")
I tested it against four fake app skeletons that I built for this post (a composer.lock with only the Livewire entry, one routes/web.php, one service provider). They are fixtures, not real apps, so they prove the script’s logic and nothing about your code. The second one is a patched version with the same routes:
1app: lw-fixtures/app-a-3.8.11-domain-persistent
2Q1 version : 3.8.11 -> INSIDE the affected range (3.7.4 up to 3.8.11): update to 3.8.12 or later 3.x
3Q2 domain routes : 1 line(s)
4 routes/web.php:3: Route::domain('{tenant}.example.test')->middleware('can:update,post')->group(function () {
5Q3 persisted middleware : 1 custom line(s), 1 default-persisted route line(s)
6 app/Providers/AppServiceProvider.php:4: Livewire::addPersistentMiddleware([\App\Http\Middleware\EnsureUserHasRole::class]);
7 routes/web.php:3: Route::domain('{tenant}.example.test')->middleware('can:update,post')->group(function () {
8info trusted hosts : not configured (Laravel answers any Host)
9verdict : all three answers are yes -> read the advisory conditions, then update and move the check into the action
10not checked by this script: whether a second hostname reaches the same app (that is server config)
1app: lw-fixtures/app-b-4.4.9-domain-persistent
2Q1 version : 4.4.9 -> patched (4.4.9 or later)
3Q2 domain routes : 1 line(s)
4 routes/web.php:3: Route::domain('{tenant}.example.test')->middleware('can:update,post')->group(function () {
5Q3 persisted middleware : 1 custom line(s), 1 default-persisted route line(s)
6 app/Providers/AppServiceProvider.php:4: Livewire::addPersistentMiddleware([\App\Http\Middleware\EnsureUserHasRole::class]);
7 routes/web.php:3: Route::domain('{tenant}.example.test')->middleware('can:update,post')->group(function () {
8info trusted hosts : not configured (Laravel answers any Host)
9verdict : not in the affected range
10not checked by this script: whether a second hostname reaches the same app (that is server config)
The third, a 4.4.8 app with a domain route and a can: rule but no addPersistentMiddleware call, is the one I changed the script for. My first version only counted addPersistentMiddleware and called that app “not every condition”. The Livewire docs say Authorize is persisted by default, so a bare can:update,post counts. The fixed script reports it correctly:
1app: lw-fixtures/app-d-4.4.8-domain-only
2Q1 version : 4.4.8 -> INSIDE the affected range (4.0.0 up to 4.4.8): update to 4.4.9 or later
3Q2 domain routes : 1 line(s)
4 routes/web.php:3: Route::domain('{tenant}.example.test')->middleware('can:update,post')->group(function () {
5Q3 persisted middleware : 0 custom line(s), 1 default-persisted route line(s)
6 routes/web.php:3: Route::domain('{tenant}.example.test')->middleware('can:update,post')->group(function () {
7info trusted hosts : not configured (Laravel answers any Host)
8verdict : all three answers are yes -> read the advisory conditions, then update and move the check into the action
9not checked by this script: whether a second hostname reaches the same app (that is server config)
The fourth fixture, a 3.7.3 single-host app with ->middleware('auth'), ends in “not in the affected range”. Reading its output was the quickest sanity check of the lot.

The fix, in the order I would do it
1. Update. Composer constraints decide how far a plain composer update moves you, so say the target out loud:
1composer require livewire/livewire:^3.8.12 # if you are on 3.x
2composer require livewire/livewire:^4.4.9 # if you are on 4.x
Run your test suite and open the app before you ship it. This is a patch release on both lines, but it touches request handling, and the first thing I look at after any request-handling patch is the happy path.
2. Tell people, or time it. The release note says to refresh already-open pages. For an internal tool, a message in the team chat is enough. For a customer-facing app, deploy at a quiet hour and expect a few “my click did nothing” reports from people who had a tab open overnight.
3. Put the permission check inside the action. The advisory’s own second workaround is to “perform authorization within sensitive component actions instead of relying solely on persistent route middleware”. The Livewire security docs already recommend this for another reason: action parameters and public properties are input from the browser. Here is the shape from the docs, applied to the UpdatePost component from earlier:
1public function update(): void
2{
3 // Runs on every update request, whatever route or host it arrived on.
4 $this->authorize('update', $this->post);
5
6 $this->post->update([
7 'title' => $this->title,
8 'content' => $this->content,
9 ]);
10}
One line, in the one place that cannot be skipped. The route rule can stay. It is still the right place to keep strangers away from the page. It just stops being the only thing standing between a click and your database.
4. Pin the test, so it stays true. Livewire’s testing docs have an authorization pattern. The version for this component is:
1use App\Livewire\UpdatePost;
2use App\Models\Post;
3use App\Models\User;
4use Livewire\Livewire;
5
6it('refuses to update a post the user cannot edit', function () {
7 $user = User::factory()->create();
8 $stranger = User::factory()->create();
9 $post = Post::factory()->for($stranger)->create();
10
11 Livewire::actingAs($user)
12 ->test(UpdatePost::class, ['post' => $post])
13 ->set('title', 'not mine')
14 ->call('update')
15 ->assertForbidden();
16});
A test like this does not reproduce the advisory. Livewire’s test harness fakes the request, and the code comment in Livewire itself says persistent middleware is skipped for fake requests such as tests. What it does is guarantee the check exists inside the action, which is exactly the protection that does not depend on which route or host the update used.
5. Decide which hostnames your app should answer on. This one is optional and it is my suggestion, not the advisory’s. Laravel answers any Host header by default unless you enable trusted hosts. Laravel’s docs show the switch in bootstrap/app.php:
1->withMiddleware(function (Middleware $middleware): void {
2 $middleware->trustHosts(at: ['^example\.com$'], subdomains: true);
3})
That refuses hostnames you never meant to serve, such as a forgotten staging alias or a raw server name. It does not help if the “other host” is one of your legitimate tenant domains, so treat it as hygiene, not as the fix.
Test after you bump: every hostname you serve
Because the patched code ties an update to the origin of the page, the first test I would run after the bump is boring on purpose: open one Livewire page on each hostname you serve, click a button that calls an action, and watch the network tab.
- A tenant subdomain, the main app domain, and your custom domains, if you have them.
- The
wwwform and the bare domain, if one redirects to the other. - Local and staging hostnames.
- Anything behind a proxy or a load balancer that rewrites the host or the scheme. The new check compares scheme plus host, so a page rendered as
https://...and an update that arrives ashttp://...inside the app is a mismatch.
I have not run those cases against 3.8.12 or 4.4.9. They come from reading the new comparison, which is why they are on the list. If everything passes, you have also learned which hostnames actually reach your update endpoint, which is the fourth question the grep could not answer.
What this does not say
- It does not say your app is exposed. It says that when three conditions hold, the route-level rule can be skipped. Plenty of apps have two of them.
- It does not say “critical”. The vendor rates it Moderate, 6.8, and that is the label I use.
- It does not say anybody exploited this. The advisory does not mention exploitation and I found nothing that does.
- It does not say Livewire is unsafe. The security change sits in one source file, with tests, and the patched releases appeared minutes before the advisory on Nov 21.
- It does not say route-level middleware is wrong. It says it should not be the only layer on a path that changes data.
What I did and did not verify
I did: read the advisory and the Livewire security docs with a fresh fetch on Nov 23; read both GitHub release bodies and confirmed the affected and patched ranges against the package list; read the source diff between v3.8.11 and v3.8.12 and the file at v4.4.8 and v4.4.9; wrote the script and ran it on four fixtures, with the real output above.
I did not: run any PHP. This host has no PHP or Composer, so the PHP snippets above are copied from the Livewire and Laravel docs and adapted by hand, not executed. I did not install Livewire, did not build a two-host app, and did not reproduce the bypass. I did not check how many apps meet all three conditions, and I did not test how a default Forge or Octane setup answers on a second hostname. The advisory gives the conditions. I give you a way to check them in your repo.
What you should do Monday morning
- Run
grep -A3 '"name": "livewire/livewire"' composer.lockin each Laravel app. Write down the version next to the app name. - Run the script above on each one that is inside the range. Read the three answers, then read the line about the second hostname and ask whoever owns DNS and the web server.
- Update to 3.8.12 or 4.4.9 in a branch. Run your tests and open one Livewire page.
- Open that page on every hostname you serve, click an action, and keep the network tab open. A 404 on an update is a finding, not a bug in this post.
- Add
$this->authorize(...)to every action that writes data, starting with the ones behind a domain route. Add one test per component that proves a stranger gets a 403. - Deploy at a quiet hour, and tell people with long-lived tabs to refresh.

What this connects to
Same shape, different framework piece: a Laravel signed link that outlives its expiry was also “one version check, one grep”. If you run Vue on the front end, the Vue patch that touches Teleport and SSR variables uses the same method: list the files that use the feature, then test one. For a patch where the first question is “is this server even exposed”, see the PHP security release checklist. The wider Laravel and Vue notes live on the Laravel and Vue SaaS hub, and the start here page lists the rest.
Further reading
Source Livewire advisory: Changing the Host can bypass Livewire persistent middleware (GHSA-vw9g-2c4c-g767)
Source Livewire v4.4.9 release (and v3.8.12 for the 3.x line)
Source Livewire docs: Security (action parameters, persistent middleware)
Source Laravel docs: HTTP requests, configuring trusted hosts
