CVE-2026-41886 locize Client SDK: Cross-origin DOM XSS & Handler Hijack Through Missing e.origin Validation in InContext Editor

High 7.5 Published Updated

Attackers can execute arbitrary scripts or hijack handlers in locize-enabled applications by sending crafted postMessages without origin validation.

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

What is CVE-2026-41886?

CVE-2026-41886 is a high-severity cross-site scripting vulnerability in locize, published on 8 May 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

locize is a localization platform that connects code and i18n setup. Prior to version 4.0.21, the locize client SDK registers a window.addEventListener("message", …) handler that dispatches to registered internal handlers (editKey, commitKey, commitKeys, isLocizeEnabled, requestInitialize, …) without validating event.origin. The pre-patch listener in src/api/postMessage.js gates dispatch on event.data.sender === "i18next-editor-frame" — that value sits inside the attacker-controlled message payload, not the browser-enforced origin. Any web page that could embed or be embedded by a locize-enabled host — an iframe on a third-party page, a window.open-ed victim, a parent frame reaching down — could send a crafted postMessage and trigger the internal handlers. This issue has been patched in version 4.0.21.

Weakness: CWE-79, CWE-346

Which versions are affected by CVE-2026-41886?

2 open source packages ship an affected version, including locize.

PackageAffectedFixed in
locize npmAll versions4.0.21
locize npmAll versions4.0.21

How do I fix CVE-2026-41886?

Upgrade locize to 4.0.21 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-41886 being exploited?

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

Sources

Also known as GHSA-w937-fg2h-xhq2.

Is CVE-2026-41886 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free