ofirdagan/cross-domain-local-storage · Security
xdlocalstorage does not verify request origin
- GHSA ID
- GHSA-mr5m-2385-2vcp
- CVE ID
- CVE-2020-11610
- Severity
- high
- Published
- Updated
- CVSS
- 8.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- CVSS v3
- 8.8 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Description
An issue was discovered in xdLocalStorage through 2.0.5. The postData() function in xdLocalStoragePostMessageApi.js specifies the wildcard (*) as the targetOrigin when calling the postMessage() function on the parent object. Therefore any domain can load the application hosting the "magical iframe" and receive the messages that the "magical iframe" sends.
CWEs
- CWE-668 · Exposure of Resource to Wrong Sphere
References
- https://nvd.nist.gov/vuln/detail/CVE-2020-11610 ↗
- https://grimhacker.com/exploiting-xdlocalstorage-localstorage-and-postmessage/#Missing-TargetOrigin-Magic-iframe ↗
- https://github.com/ofirdagan/cross-domain-local-storage/issues/17 ↗
- https://github.com/ofirdagan/cross-domain-local-storage/pull/19 ↗
- https://github.com/advisories/GHSA-mr5m-2385-2vcp ↗