Medium · 4.2 Laravel GHSA-mhf7-xp6r-6qrc PKSA-xhv3-nr94-h8db
Livewire Authorization Bypass Lets Users Act on Records They Don't Own
Livewire versions 4.3.0 up to 4.4.8 contain an authorization bypass in the #[Authorize] attribute, allowing authenticated users to trigger actions against records they do not own. Fixed in 4.4.8.
AI summary
A vulnerability has been disclosed in the Livewire PHP framework affecting its #[Authorize] attribute, a mechanism developers use to restrict actions and event listeners to authorized users. Three related issues could allow an authenticated user to perform actions against records belonging to another user, even though the #[Authorize] check appeared to pass. The issue is fixed in version 4.4.8.
What Happened
Three related issues were found in how Livewire's #[Authorize] attribute enforces authorization: 1. Out-of-order parameter keys on actions: #[Authorize] resolved a model parameter by its array key, while the underlying action received parameters positionally. A request could send parameters as an object with reordered integer keys (for example, {"1": 2, "0": 1}), causing the authorization check to pass against a record the user owns while the actual action executed against a different record. For example, with #[Authorize('delete', 'comment')] on a deleteComment(Comment $comment) method, a user could delete another user's comment. 2. The same flaw affected event listeners that combine #[On] and #[Authorize] with a model parameter, exploitable through the internal __dispatch call. 3. #[Json] methods ran before authorization: when a method had both #[Json] and #[Authorize], the method body executed before the authorization check occurred. The HTTP response still returned a 403, but any side effects of the method body (such as database writes) had already taken place.
Technical Cause
The root cause is a mismatch between how #[Authorize] resolves model parameters (by array key) and how the underlying action or listener consumes parameters (positionally). This mismatch can be exploited by sending parameters with reordered integer keys. Separately, methods annotated with #[Json] executed their body before the #[Authorize] check ran, meaning authorization was effectively checked too late to prevent side effects. Applications that perform authorization manually inside the method body (e.g., via $this->authorize(...)) rather than relying on the #[Authorize] attribute are not affected. Livewire 3.x is also not affected.
Why It Matters
Any Livewire application that uses the #[Authorize] attribute on methods taking model parameters, or on #[Json] methods, may allow an authenticated user to perform unauthorized actions against another user's data — including destructive actions like deletion — despite the authorization check appearing to succeed. Because this requires only a low level of privilege and no user interaction from the victim, it is straightforward for an authenticated attacker to exploit once they understand the request structure.
Affected Versions
livewire/livewire versions from 4.3.0 up to (but not including) 4.4.8 are affected. Livewire 3.x is explicitly stated as not affected. The issue is fixed in version 4.4.8.
Fixes and Mitigation
The vendor has released version 4.4.8, which fixes all three issues: call and event parameters must now be provided as a list or with named (string) keys, otherwise the request is rejected, and #[Json] methods are now authorized before their body executes. If upgrading immediately is not possible, applications can mitigate by calling $this->authorize(...) explicitly inside affected methods instead of relying solely on the #[Authorize] attribute.
Recommended Action
Upgrade livewire/livewire to version 4.4.8 or later as soon as possible. If you cannot upgrade immediately, review all methods using the #[Authorize] attribute with model parameters or #[Json], and add explicit $this->authorize(...) calls as a temporary mitigation.
PatchBriefing score
4.2 / 10 · Medium
Official CVSS: 6.5
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
Why this score
This issue carries a CVSS base score of 6.5 (AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N), reflecting a network-exploitable flaw requiring low privileges and no user interaction, with high impact on integrity but none on confidentiality or availability. PatchBriefing's computed score of 4.2 reflects this base severity combined with the facts that there is no known exploitation, no public exploit code, and a fix is already available, while accounting for the attribute's wide usage via the popular Livewire package.
Affected versions
- livewire/livewire >= 4.3.0, < 4.4.8
- vulnerable
- livewire/livewire >=4.3.0,<4.4.8
- vulnerable
- livewire/livewire ≥ 4.3.0 < 4.4.8
- vulnerable
- livewire/livewire
- vulnerable
- ≥ 4.4.8
- patched
Reported fixes
The vendor has released version 4.4.8, which fixes all three issues: call and event parameters must now be provided as a list or with named (string) keys, otherwise the request is rejected, and #[Json] methods are now authorized before their body executes. If upgrading immediately is not possible, applications can mitigate by calling $this->authorize(...) explicitly inside affected methods instead of relying solely on the #[Authorize] attribute.
How this was built
2 source records were collected, matched and used to prepare the report above.
-
GitHub Advisory Database database
-
Packagist Security Advisories registry
Revision history
- Published
- Generated
Related
Relevant changes for the stacks you follow.
Choose your stacks, topics and optional WordPress plugins. At 07:00 CEST, matching advisories and releases from the reporting period are grouped into one email.
✓ Choose stacks and topics✓ Change preferences anytime✓ One grouped email