High

Reflected XSS when using flashMessages or languageDictionary

  • Disclosed: 04.06.2021
  • Updated: 11.10.2026 10:22

Overview

Versions before and including 11.30.0 are vulnerable to reflected XSS. An attacker can execute arbitrary code when the library's

  • flashMessage feature is utilized and user input or data from URL parameters is incorporated into the flashMessage.
  • languageDictionary feature is utilized and user input or data from URL parameters is incorporated into the languageDictionary.

Am I affected?

You are affected by this vulnerability if you are using auth0-lock version 11.30.0 or lower and all of the following conditions apply:

  • You are utilizing flashMessage feature.
  • User input or data from URL parameters is incorporated into the flashMessage.

An example of a vulnerable snippet where query parameters are used to populate the text property of a flashMessage.

js
var params = new URLSearchParams(location.search);
var errorMessage = params.get('error__message');
var showParams = {};

if (!!errorMessage === true) {
  showParams.flashMessage = {
    type: 'error',
    text: 'We were unable to log you in. ' + errorMessage,
  };
}

lock.show(showParams);

OR

  • You are utilizing languageDictionary feature.
  • User input or data from URL parameters is used in languageDictionary properties.

An example of a vulnerable snippet where query parameters are used to populate the socialLoginInstructions property of a languageDictionary.

js
var params = new URLSearchParams(location.search);
var instruction = params.get('instruction');

var options = {
  languageDictionary: {
    emailInputPlaceholder: "something@youremail.com",
    title: "title",
    socialLoginInstructions: instruction
  },
};

var lock = new Auth0LockPasswordless(
    CLIENT_ID,
    DOMAIN,
    options
);

lock.show()

How to fix that?

Upgrade to version 11.30.1.

Will this update impact my users?

The fix uses DOMPurify to sanitise the flashMessage and languageDictionary inputs. If you are including inline JavaScript in these fields, like script tags or onclick attributes, these will be removed.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package auth0-lock < 11.30.1 11.30.1

References

CVSS score 8.1/10
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-79
Platform
npm
Package
auth0-lock
Disclosed
04.06.2021
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-jr3j-whm4-9wwm - CC BY 4.0

Vulnerability history: auth0-lock

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
4
First → latest
01.2020 05.2022
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 1
  • Medium 2
  • Low 1

Disclosures per year

  1. 2020: 2
  2. 2021: 1
  3. 2022: 1
  4. 2023: 0
  5. 2024: 0
  6. 2025: 0
  7. 2026: 0
  1. Medium · 6.1 CVE-2022-29172 < 11.33.0 11.33.0
  2. Reflected XSS when using flashMessages or languageDictionary this entry
    High · 8.1 CVE-2021-32641 < 11.30.1 11.30.1
  3. Low · 6.4 CVE-2020-15119 < 11.26.3 11.26.3
  4. Medium · 6.1 CVE-2019-20174 < 11.21.0 11.21.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.