OSV 1.4.0 · github-reviewed · 修改于 2023-09-12 02:14
发布时间
2020-02-01 01:59
GitHub 审查时间
2020-01-31 08:31
NVD 发布时间
—
源文件
advisories/github-reviewed/2020/01/GHSA-w2pf-g6r8-pg22/GHSA-w2pf-g6r8-pg22.json
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.
You are affected by this vulnerability if all of the following conditions apply:
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:
<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>
Developers using Auth0’s signin solution Lock need to upgrade to version 11.21.0 or later. Version 11.21.0 introduces two changes:
placeholder property is now treated as plain text to mitigate the problem.placeholderHTML property is introduced that indicates the level of control it provides and that it should be only supplied from trusted sources.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.