# CVE-2026-81887: Livewire DOM-based cross-site scripting during client-side state handling

> An attacker can execute arbitrary JavaScript in the user's browser via a crafted URL due to prototype pollution in Livewire's client-side state handling.

- **Severity:** Medium 5.1 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 31 Aug 2026
- **Updated:** 3 Sep 2026
- **Also known as:** CLSA-2026-1790868445, CLSA-2026-1790868699, GHSA-g3hc-697w-wm82

## What is CVE-2026-81887?

CVE-2026-81887 is a medium-severity cross-site scripting vulnerability in livewire, published on 31 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Livewire is a full-stack framework for Laravel. From 3.0.0-beta.1 until 3.8.3 and 4.3.4, the dot-notated query-string parser in js/plugins/history/index.js, including fromQueryString() and insertDotNotatedValueIntoData(), accepts the __proto__, constructor, and prototype path segments and creates inherited objects. Client-side state handlers then access effects.html, effects.js, effects.xjs, and effects.scripts without Object.prototype.hasOwnProperty.call(), allowing inherited attacker-controlled state to be treated as trusted effects. An unauthenticated attacker can craft a URL that, when opened by a user, executes arbitrary JavaScript in the affected application's origin. Exploitation requires user interaction and does not bypass server-side authorization or grant privileges beyond the affected user. This issue is fixed in versions 3.8.3 and 4.3.4.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation), CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes)

## Which versions are affected by CVE-2026-81887?

4 open source packages ship an affected version, including livewire/livewire.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `livewire/livewire` | Packagist | From 3.0.0-beta.1 | 3.8.3 |
| `livewire/livewire` | Packagist | From 3.0.0-beta.1 | 3.8.3 |
| `livewire/livewire` | Packagist | From 4.0.0-beta.1 | 4.3.4 |
| `livewire/livewire` | Packagist | From 4.0.0-beta.1 | 4.3.4 |

## How do I fix CVE-2026-81887?

Upgrade livewire/livewire to a fixed version for your release line: 3.8.3 or 4.3.4.

## Is CVE-2026-81887 being exploited?

There is no known exploitation of CVE-2026-81887 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-81887 and fix it if it is affected.

What it is: CVE-2026-81887 is a medium-severity cross-site scripting vulnerability in livewire, published on 31 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-81887 in the wild and no public exploit code.

Affected packages and fixed versions:
- livewire/livewire (Packagist): affected from 3.0.0-beta.1; fixed in 3.8.3
- livewire/livewire (Packagist): affected from 3.0.0-beta.1; fixed in 3.8.3
- livewire/livewire (Packagist): affected from 4.0.0-beta.1; fixed in 4.3.4
- livewire/livewire (Packagist): affected from 4.0.0-beta.1; fixed in 4.3.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-81887/ (Markdown: https://insights.sbomify.com/CVE-2026-81887/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-81887
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-81887
- OSV: https://osv.dev/vulnerability/CVE-2026-81887

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-81887/
Summaries are generated and may contain mistakes; the official description above is the record.
