CVE-2020-11611: Open Redirect in xdLocalStorage

xdlocalstorage Updated 02 Oct 2025

Summary

09/12/2021
No i
Moderate
6.1

CVE-2020-11611: Open Redirect in xdLocalStorage. Affects xdlocalstorage versions < 2.0.5. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

xdLocalStorage is an npm package that provides a cross-domain local storage solution for web applications. It allows data to be stored and accessed across different domains securely. However, a vulnerability has been discovered in versions up to 2.0.5 of xdLocalStorage. This vulnerability allows an attacker to perform an open redirect attack by exploiting the buildMessage() function in xdLocalStorage.js. By specifying the wildcard (*) as the targetOrigin when calling the postMessage() function on the iframe object, any domain currently loaded within the iframe can receive the messages sent by the client.

Vulnerability Detail

The vulnerability arises from the improper use of the wildcard (*) as the targetOrigin in the postMessage() function. This allows an attacker to craft a malicious URL that redirects the user to a different domain, potentially leading to phishing attacks or other malicious activities. The impact of this vulnerability depends on the intentions of the attacker and the trust users place in the redirected domain. It is important to note that this vulnerability only affects versions up to 2.0.5 of xdLocalStorage.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If updating xdLocalStorage is not immediately feasible, a temporary workaround can be implemented by modifying the buildMessage() function in xdLocalStorage.js. Instead of using the wildcard (*) as the targetOrigin, developers can specify the exact target domain to restrict the messages to that domain only. Here is an example of the modified code:

function buildMessage(message) {
  var targetOrigin = 'https://example.com'; // Replace with the desired target domain
  iframe.contentWindow.postMessage(message, targetOrigin);
}

Conclusion

In conclusion, the vulnerability CVE-2020-11611 in xdLocalStorage up to version 2.0.5 allows for open redirect attacks. It is crucial to update xdLocalStorage to a version beyond 2.0.5 or implement the provided workaround to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for xdlocalstorage →

Share this vulnerability

FAQ

xdLocalStorage is an npm package that provides a cross-domain local storage solution for web applications. It allows data to be stored and accessed across different domains securely.

An open redirect attack is a type of security vulnerability that allows an attacker to redirect a user to a different domain without their consent. This can be exploited for phishing attacks or to trick users into visiting malicious websites.

Versions up to 2.0.5 of xdLocalStorage are affected by this vulnerability.

The impact of this vulnerability depends on the intentions of the attacker and the trust users place in the redirected domain. It can be used for phishing attacks or to trick users into visiting malicious websites.

To fix this vulnerability, it is recommended to update xdLocalStorage to a version beyond 2.0.5. Alternatively, you can modify the buildMessage() function to specify the exact target domain instead of using the wildcard (*).

Related vulnerabilities

Recent vulnerabilities recorded for xdlocalstorage.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback