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 package | Versions | Reported by |
|---|---|---|
| auth0 lock | <= 11.30.0, before 11.30.1 | CVE List, NVD |
| auth0-lock (npm) | before 11.30.1 | GitHub Advisory Database |
All scores
| GitHub_M | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 8.1high CVSS:3.1 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 4.3medium CVSS:2.0 | AV: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
flashMessagefeature is utilized and user input or data from URL parameters is incorporated into theflashMessage.languageDictionaryfeature is utilized and user input or data from URL parameters is incorporated into thelanguageDictionary.
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
flashMessagefeature. - 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
languageDictionaryfeature. - User input or data from URL parameters is used in
languageDictionaryproperties.
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
| https://github.com/auth0/lock/security/advisories/GHSA-jr3j-whm4-9wwm | exploit, third-party-advisory, web | |
| https://github.com/auth0/lock/commit/d139cf01c8234b07caf265e051f39d3eab08f7ed | patch, third-party-advisory, web | |
| https://github.com/auth0/lock/releases/tag/v11.30.1 | release-notes, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-32641 | advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-32641 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jr3j-whm4-9wwm changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-32641 changed 2026-06-17 | Public domain |