CVE-2021-32641
JSON

8.1high

Reflected XSS when using flashMessages

Severity
8.1high CVSS:3.1 by GitHub_M
Exploit likelihood
1.54% (higher than 75% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-jr3j-whm4-9wwm

Description

auth0-lock is Auth0's signin solution. Versions of nauth0-lock 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` or the library's `languageDictionary` feature is utilized and user input or data from URL parameters is incorporated into the `languageDictionary`. The vulnerability is patched in version 11.30.1.

Affected

Product or packageVersionsReported by
auth0 lock<= 11.30.0, before 11.30.1CVE List, NVD
auth0-lock (npm)before 11.30.1GitHub Advisory Database

All scores

GitHub_M8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub8.1high CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD6.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
NVD4.3medium CVSS:2.0AV:N/AC:M/Au:N/C:N/I:P/A:N

Classification

What each source says

CVE List

auth0-lock is Auth0's signin solution. Versions of nauth0-lock 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` or the library's `languageDictionary` feature is utilized and user input or data from URL parameters is incorporated into the `languageDictionary`. The vulnerability is patched in version 11.30.1.

GitHub Advisory Database
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.

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.

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.

NVD (es)

auth0-lock es la solución de inicio de sesión de Auth0. Versiones de nauth0-lock anteriores e incluyendo a "11.30.0", son vulnerables a ataques de tipo XSS reflejado. Un atacante puede ejecutar código arbitrario cuando se utiliza la funcionalidad "flashMessage" de la biblioteca y se incorporan entradas o datos de parámetros de URL en el "flashMessage" o se utiliza la funcionalidad "languageDictionary" de la biblioteca y se incorporan entradas o datos de parámetros de URL en el "languageDictionary". La vulnerabilidad es parcheada en la versión 11.30.1

References

Sources

SourceRecordLicence
CVE ListCVE-2021-32641 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-jr3j-whm4-9wwm changed 2026-07-08CC-BY-4.0
NVDCVE-2021-32641 changed 2026-06-17Public domain