| タイトル | AngularのAngularJSにおけるクロスサイトスクリプティングの脆弱性 |
|---|---|
| 概要 | Angularは、TypeScript/JavaScriptやその他の言語を使用してモバイルおよびデスクトップ向けのWebアプリケーションを構築するための開発プラットフォームです。バージョン22.0.0-rc.2、21.2.16、20.3.24、19.2.25より前の@angular/platform-serverのDOMエミュレーション依存ライブラリ(domino)には、生テキスト要素(<script>、<style>、<iframe>など)の内容をシリアライズする際にクロスサイトスクリプティング(XSS)脆弱性が存在します。dominoはシリアライズ中に生テキスト要素の閉じタグの破綻を防ぐためにエスケープ処理をサポートしていますが、このエスケープロジックにUnicodeのインデックス整合性のバグがありました。JavaScriptでは文字列の長さや文字インデックスはUTF-16コード単位で計算されます(絵文字などのアストラル文字は2コード単位=4バイトを占めます)。もし閉じタグ(例: </script>、</style>、</iframe>)の直前の動的テキストにアストラルUnicode文字が含まれている場合、dominoの置換ロジック内のインデックスオフセット計算がずれます。この不整合によって閉じタグの置換やエスケープ処理が失敗し、生成されたHTML内でそのタグが未エスケープのまま残ってしまいます。攻撃者が動的テキストを操作できる場合、アストラルUnicode文字と閉じタグ(例:? </iframe><script>alert(1)</script>)を含むペイロードを提供できます。サーバーサイドレンダリング時にこのテキストがシリアライズされると、ブラウザは未エスケープの閉じタグを解析し、生テキストコンテキストを早期に終了して以降の<script>ブロックを実行し、同一生成元のクロスサイトスクリプティング(XSS)が発生します。この脆弱性はバージョン22.0.0-rc.2、21.2.16、20.3.24、19.2.25で修正されています。 |
| 想定される影響 | ・当該ソフトウェアが扱う情報の一部が外部に漏れる可能性があります。 ・当該ソフトウェアが扱う情報の一部が書き換えられる可能性があります。 ・当該ソフトウェアは停止しません。 |
| 対策 | ベンダ情報を参照して適切な対策を実施してください。 |
| 公表日 | 2026年6月22日0:00 |
| 登録日 | 2026年6月29日11:24 |
| 最終更新日 | 2026年6月29日11:24 |
| CVSS3.0 : 警告 | |
| スコア | 6.1 |
|---|---|
| ベクター | CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| Angular |
| AngularJS 18.2.14 およびそれ以前 |
| AngularJS 19.0.0 以上 19.2.25 未満 |
| AngularJS 20.0.0 以上 20.3.24 未満 |
| AngularJS 21.0.0 以上 21.2.6 未満 |
| AngularJS 22.0.0 |
| No | 変更内容 | 変更日 |
|---|---|---|
| 1 | [2026年06月29日] 掲載 |
2026年6月29日11:24 |
| 概要 | Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 22.0.0-rc.2, 21.2.16, 20.3.24, and 19.2.25, a Cross-Site Scripting (XSS) vulnerability exists in @angular/platform-server's DOM emulation dependency (domino) when serializing the content of raw-text elements (such as <script>, <style>, and <iframe>). domino supports escaping raw-text elements during serialization to prevent closing-tag breakout. However, a Unicode index alignment bug existed in this escaping logic. In JavaScript, string lengths and character indices are calculated based on UTF-16 code units (where astral characters—such as emojis—occupy 2 code units / 4 bytes). If the bound dynamic text contained astral Unicode characters before the closing tag (e.g. </script>, </style>, or </iframe>), the index offset calculation in domino's replacement logic shifted. This misalignment caused domino to fail to replace or escape the closing tag, leaving it raw and unescaped in the output HTML. An attacker who controls the dynamic text can supply a payload containing both an astral Unicode character and a closing tag (e.g., 😀</iframe><script>alert(1)</script>). When serialized on the server during SSR, the browser parses the unescaped closing tag, exits the raw-text context early, and executes the subsequent <script> block, leading to same-origin Cross-Site Scripting (XSS). This vulnerability is fixed in 22.0.0-rc.2, 21.2.16, 20.3.24, and 19.2.25. |
|---|---|
| 公表日 | 2026年6月23日3:16 |
| 登録日 | 2026年6月27日4:10 |
| 最終更新日 | 2026年6月27日4:39 |
| 構成1 | 以上 | 以下 | より上 | 未満 | |
| cpe:2.3:a:angularjs:angularjs:*:*:*:*:*:*:*:* | 18.2.14 | ||||
| cpe:2.3:a:angularjs:angularjs:*:*:*:*:*:*:*:* | 19.0.0 | 19.2.25 | |||
| cpe:2.3:a:angularjs:angularjs:*:*:*:*:*:*:*:* | 20.0.0 | 20.3.24 | |||
| cpe:2.3:a:angularjs:angularjs:*:*:*:*:*:*:*:* | 21.0.0 | 21.2.6 | |||
| cpe:2.3:a:angularjs:angularjs:22.0.0:next0:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:next1:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:next10:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:next11:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:next12:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:next2:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:next3:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:next4:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:next5:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:next6:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:next7:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:next8:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:next9:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:rc0:*:*:*:*:*:* | |||||
| cpe:2.3:a:angularjs:angularjs:22.0.0:rc1:*:*:*:*:*:* | |||||