Exposure of Resource to Wrong Sphere Affecting xdlocalstorage package, versions >=0.0.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.58% (78th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-XDLOCALSTORAGE-5781191
  • published18 Jul 2023
  • disclosed24 May 2022
  • creditUnknown

Introduced: 24 May 2022

CVE-2020-11610  (opens in a new tab)
CWE-668  (opens in a new tab)

How to fix?

A fix was pushed into the master branch but not yet published.

Overview

xdlocalstorage is a lightweight js library which implements LocalStorage interface and support cross domain storage by using iframe post message communication.

Affected versions of this package are vulnerable to Exposure of Resource to Wrong Sphere. 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 "magic iframe" and receive the messages that the "magic iframe" sends.

CVSS Scores

version 3.1