Highcharts Grid Pro: セルレンダラーの `attributes` マップは、生の `setAttribute` を使用して記述されています。

### 影響
入力型セルレンダラーは、レンダラーの `attributes` オプションのすべての項目を、作成する入力または選択要素にコピーしますが、属性名をチェックしません。 Grid の構成を制御できる攻撃者は、列の `cells.renderer.attributes` または `cells.editMode.renderer.attributes` に、名前がイベントハンドラーである項目を挿入することができます。これらのハンドラーは、Grid をホストしているページのオリジンで実行されます。 ビューレンダラーは、Grid がレンダリングされるとすぐに、列のすべての行でレンダリングされた入力にハンドラーを配置します。 エディットモードレンダラーは、セルが編集モードに入るときに作成された入力にハンドラーを配置し、その入力がすぐにフォーカスされるため、`focus` ハンドラーはユーザーが編集を開始するとすぐに実行されます。 脆弱性を利用するには、信頼できないデータが Grid の構成に到達し、ユーザーがレンダリングされた入力のいずれかにマウスオーバーしたり、フォーカスさせたり、またはセルの編集を開始する必要があります。 Dashboards パッケージに含まれる Pro DataGrid が影響を受けます。

### 対策
列の構成が完全に制御できないソースから取得される場合は、`Grid` モジュールをインポートした直後に、以下のコードを貼り付けてください。

```ts
const ALLOWED_RENDERER_ATTRIBUTES = [
'autofocus', 'checked', 'max', 'maxlength', 'min', 'minlength',
'multiple', 'pattern', 'placeholder', 'size', 'step'
];

const scrubColumn = (column) => {
const cells = column?.cells;

for (const renderer of [cells?.renderer, cells?.editMode?.renderer]) {
const attributes = renderer?.attributes;

if (attributes) {
for (const key of Object.keys(attributes)) {
if (!ALLOWED_RENDERER_ATTRIBUTES.includes(key.toLowerCase())) {
delete attributes[key];
}
}
}
}

return column;
};

const scrubOptions = (options) => {
scrubColumn(options?.columnDefaults);
(options?.columns || []).forEach(scrubColumn);
return options;
};
```

```
const proto = Grid.Grid.prototype;

const loadUserOptions = proto.loadUserOptions;
proto.loadUserOptions = function (options, ...rest) {
scrubOptions(Grid.defaultOptions);
return loadUserOptions.call(this, scrubOptions(options), ...rest);
};

const updateColumn = proto.updateColumn;
proto.updateColumn = function (columnId, options, ...rest) {
return updateColumn.call(this, columnId, scrubColumn(options), ...rest);
};
```

### パッチ版の入手方法
パッチが適用されたバージョンは、通常の配布チャネルから入手できます。npmを使用している場合は、影響を受けるパッケージを上記のパッチ版にアップグレードしてください。例えば、`npm install @highcharts/grid-lite@3.2.0`。Highcharts GridをCDNから読み込んでいる場合は、バージョン番号付きのURLを使用してください。例えば、`https://cdn.jsdelivr.net/npm/@highcharts/grid-lite@3.2.0/grid-lite.js`。各インストール方法の詳細については、[インストールガイド](https://www.highcharts.com/docs/grid/installation)を参照してください。

影響を受けるパッケージ:
- npm (JavaScript) @highcharts/grid-pro: 影響範囲は2.0.0以上、3.1.0以下、3.2.0で修正済み
- npm (JavaScript) @highcharts/dashboards: 影響範囲は3.6.0、4.0.0で修正済み
```