| Gói / sản phẩm | Phiên bản bị ảnh hưởng | Phiên bản đã vá |
|---|---|---|
| lock | < 11.30.1 | 11.30.1 |
| auth0-lock | < 11.30.1 | 11.30.1 |
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.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:
flashMessage feature.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
languageDictionary feature.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: "[email protected]",
title: "title",
socialLoginInstructions: instruction
},
};
var lock = new Auth0LockPasswordless(
CLIENT_ID,
DOMAIN,
options
);
lock.show()
Upgrade to version 11.30.1.
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.
Bạn đang dùng một trong các sản phẩm này? Quét site để biết có đang lộ phiên bản có lỗ hổng không.
Quét site miễn phí