Medium

auth0-lock vulnerable to XSS via unsanitized placeholder property

  • Disclosed: 31.01.2020
  • Updated: 11.10.2026 10:22

Overview

Auth0 Lock version 11.20.4 and earlier did not properly sanitize the generated HTML code. Customers using the additionalSignUpFields customization option to add a checkbox to the sign-up dialog that are passing a placeholder property obtained from an untrusted source (e.g. a query parameter) could allow cross-site scripting (XSS) on their signup pages.

Am I affected?

You are affected by this vulnerability if all of the following conditions apply:

  • You are using Auth0 Lock version 11.20.4 or earlier.
  • You pass additionalSignUpFields as options when initializing Lock which includes a field of type checkbox whose placeholder value is obtained from an untrusted source.

An example of a vulnerable snippet is the following where the placeholder value is partially user-controlled by the name query parameter:

js
<script>
    var params = new URLSearchParams(window.location.search);
    var options = {
        auth: {
            redirectUrl: 'http://localhost:12345/callback',
            responseType: 'code',
            params: {
                scope: 'openid email',
            },
        },
        additionalSignUpFields: [{
            name: 'agree',
            type: 'checkbox',
            placeholder: "I agree to Terms and Conditions for " + params.get('name'),
        }],
    };
    var lock = new Auth0Lock('<CLIENT_ID>', '<TENANT_NAME>.auth0.com', options);
    lock.show({
        allowShowPassword: true,
        initialScreen: 'signUp',
    });
</script>

How to fix that?

Developers using Auth0’s signin solution Lock need to upgrade to version 11.21.0 or later. Version 11.21.0 introduces two changes:

  1. The existing placeholder property is now treated as plain text to mitigate the problem.
  2. A new placeholderHTML property is introduced that indicates the level of control it provides and that it should be only supplied from trusted sources.

Will this update impact my users?

This fix patches the Auth0 Lock widget and may require changes in application code, but it will not impact your users, their current state, or any existing sessions.

Developers using the placeholder property with HTML content from a trusted source should start using the placeholderHTML property to continue providing the same user experience.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package auth0-lock < 11.21.0 11.21.0

References

CVSS score 6.1/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness (CWE)
CWE-79
Platform
npm
Package
auth0-lock
Disclosed
31.01.2020
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-w2pf-g6r8-pg22 - 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. 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. auth0-lock vulnerable to XSS via unsanitized placeholder property this entry
    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.