> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.generaltranslation.app/llms.txt
> Use this file to discover all available pages before exploring further.

# CVE-2021-32641:Auth0 Lockライブラリーのセキュリティ更新

> CVE-2021-32641:Auth0 Lockライブラリーのセキュリティ更新

**公開日** ：2021年6月4日

**CVE番号** ：CVE-2021-32641

<div id="overview">
  ## 概要
</div>

`11.30.0`以前のバージョンは、反射型XSSに対して脆弱です。以下のいずれかの場合、攻撃者は任意のコードを実行できます。

* ライブラリーの`flashMessage`機能が使用され、かつユーザー入力またはURLパラメーターからのデータが`flashMessage`に組み込まれた場合。

または

* ライブラリーの`languageDictionary`機能が使用され、かつユーザー入力またはURLパラメーターからのデータが`languageDictionary`に組み込まれた場合。

<div id="am-i-affected">
  ## 自分は影響を受けますか？
</div>

この脆弱性は、実装が以下の説明のいずれかに当てはまる場合、影響があります。

<div id="flashmessage-vulnerability">
  ### flashMessageの脆弱性
</div>

以下の条件がすべて満たされる場合は、脆弱です。

* `auth0-lock`バージョン`11.30.0`以前のものを使用している。
* `flashMessage`機能を使用している。
* ユーザー入力またはURLパラメーターからのデータが`flashMessage`に組み込まれている。

以下は、`flashMessage`の`text`プロパティに入力するためにクエリパラメーターが使用されている脆弱なスニペットの例です。

```javascript lines theme={null}
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);
```

<div id="languagedictionary-vulnerability">
  ### languageDictionaryの脆弱性
</div>

以下の条件がすべて満たされる場合は、脆弱です。

* `auth0-lock`バージョン`11.30.0`以前のものを使用している。
* `languageDictionary`機能を使用している。
* ユーザー入力またはURLパラメーターからのデータが、`languageDictionary`プロパティに使用されている。

以下は、`languageDictionary`の`socialLoginInstructions`プロパティに入力するためにクエリパラメーターを使用している脆弱なスニペットの例です。

```javascript lines theme={null}
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();
```

<div id="how-to-fix-that">
  ## 修正方法
</div>

`auth0-lock`バージョン`11.30.1`にアップグレードしてください。

<div id="will-this-update-impact-my-users">
  ## この更新はユーザーに影響を与えますか？
</div>

この修正は、`flashMessage`および`languageDictionary`入力をサニタイズするために、[DOMPurify](https://github.com/cure53/DOMPurify)を使用します。`script`タグまたは`onclick`属性など、これらのフィールドのJavaScript.を削除します。
