{"id":"CVE-2021-32641","aliases":["CVE-2021-32641","GHSA-jr3j-whm4-9wwm"],"related":[],"kind":"vulnerability","state":"published","title":"Reflected XSS when using flashMessages","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Overview\n\nVersions before and including `11.30.0` are vulnerable to reflected XSS.  An attacker can execute arbitrary code when the library's\n- `flashMessage` feature is utilized and user input or data from URL parameters is incorporated into the `flashMessage`.\n- `languageDictionary` feature is utilized and user input or data from URL parameters is incorporated into the `languageDictionary`.\n\n### Am I affected?\nYou are affected by this vulnerability if you are using `auth0-lock` version `11.30.0` or lower and all of the following conditions apply:\n\n- You are utilizing `flashMessage` feature.\n- User input or data from URL parameters is incorporated into the `flashMessage`.\n\nAn example of a vulnerable snippet where query parameters are used to populate the `text` property of a `flashMessage`.\n```js\nvar params = new URLSearchParams(location.search);\nvar errorMessage = params.get('error__message');\nvar showParams = {};\n\nif (!!errorMessage === true) {\n  showParams.flashMessage = {\n    type: 'error',\n    text: 'We were unable to log you in. ' + errorMessage,\n  };\n}\n\nlock.show(showParams);\n```\n\nOR\n\n- You are utilizing `languageDictionary` feature.\n- User input or data from URL parameters is used in `languageDictionary` properties.\n\nAn example of a vulnerable snippet where query parameters are used to populate the `socialLoginInstructions` property of a `languageDictionary`.\n```js\nvar params = new URLSearchParams(location.search);\nvar instruction = params.get('instruction');\n\nvar options = {\n  languageDictionary: {\n    emailInputPlaceholder: \"something@youremail.com\",\n    title: \"title\",\n    socialLoginInstructions: instruction\n  },\n};\n\nvar lock = new Auth0LockPasswordless(\n    CLIENT_ID,\n    DOMAIN,\n    options\n);\n\nlock.show()\n```\n\n### How to fix that?\nUpgrade to version `11.30.1`.\n\n### Will this update impact my users?\nThe fix uses [DOMPurify](https://github.com/cure53/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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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","source":"nvd"}],"published":"2021-06-04T19:10:34.000Z","modified":"2026-07-08T06:00:58.295Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.1,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"<= 11.30.0","status":"affected"}],"vendor":"auth0","product":"lock","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"11.30.1"}],"ecosystem":"npm","package":"auth0-lock","purl":"pkg:npm/auth0-lock","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"11.30.1"}],"vendor":"auth0","product":"lock","cpe":"cpe:2.3:a:auth0:lock:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/auth0/lock/security/advisories/GHSA-jr3j-whm4-9wwm","tags":["exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/auth0/lock/commit/d139cf01c8234b07caf265e051f39d3eab08f7ed","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/auth0/lock/releases/tag/v11.30.1","tags":["release-notes","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32641","tags":["advisory"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-32641","url":"https://www.cve.org/CVERecord?id=CVE-2021-32641","licence":"CVE Terms of Use","modified":"2024-08-03T23:25:31.021Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jr3j-whm4-9wwm","url":"https://github.com/advisories/GHSA-jr3j-whm4-9wwm","licence":"CC-BY-4.0","modified":"2026-07-08T06:00:58.295Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-32641","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32641","licence":"Public domain","modified":"2026-06-17T03:53:19.857Z"}],"updatedAt":"2026-11-25T22:58:01.661Z","epss":{"score":0.01539,"percentile":0.75251,"date":"2026-11-30T12:00:22.000Z"}}