Apostrophe TechnologiesのApostropheCMS等の複数製品におけるクロスサイトスクリプティングの脆弱性
タイトル Apostrophe TechnologiesのApostropheCMS等の複数製品におけるクロスサイトスクリプティングの脆弱性
概要

ApostropheCMSはオープンソースのNode.jsコンテンツ管理システムです。コミット49d0bb7で導入されたリグレッションは、ApostropheCMSが維持するsanitize-htmlパッケージのバージョン2.17.1に含まれており、非テキストタグ配列(textareaおよびoption)内のテキストに対するallowedTagsの適用を回避します。ApostropheCMSバージョン4.28.0は脆弱なsanitize-htmlバージョンへの依存を介して影響を受けます。packages/sanitize-html/index.jsの569-573行のコードは、htmlparser2がこれらの要素内のエンティティをデコードしないと誤って想定し、エスケープ処理をスキップしていましたが、htmlparser2の10.xはontextコールバックにテキストを渡す前にエンティティをデコードします。その結果、エンティティエンコードされたHTMLはパーサーによってデコードされ、そのままリテラルHTML文字として出力に書き込まれ、allowedTagsフィルターを完全に回避してしまいます。攻撃者はエンティティエンコードを用いて任意のタグ(XSSペイロードを含む)を許可されたoptionまたはtextarea要素を通じて注入できます。これは、formビルダーやCMSプラットフォームで一般的な、optionまたはtextareaをallowedTagsに含める非デフォルト設定に影響します。この問題はsanitize-htmlのバージョン2.17.2およびApostropheCMSのバージョン4.29.0で修正されました。

想定される影響 当該ソフトウェアが扱う情報の一部が外部に漏れる可能性があります。 また、当該ソフトウェアが扱う情報の一部が書き換えられる可能性があります。 さらに、当該ソフトウェアは停止しません。 そして、この脆弱性を悪用した攻撃により、他のソフトウェアにも影響が及ぶ可能性があります。 
対策

正式な対策が公開されています。ベンダ情報を参照して適切な対策を実施してください。

公表日 2026年4月15日0:00
登録日 2026年4月27日11:18
最終更新日 2026年4月27日11:18
CVSS3.0 : 警告
スコア 6.1
ベクター CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
影響を受けるシステム
Apostrophe Technologies
ApostropheCMS 4.29.0
sanitize-html 2.17.1 およびそれ以前
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
その他
変更履歴
No 変更内容 変更日
1 [2026年04月27日]
  掲載
2026年4月27日11:18

NVD脆弱性情報
CVE-2026-40186
概要

ApostropheCMS is an open-source Node.js content management system. A regression introduced in commit 49d0bb7, included in versions 2.17.1 of the ApostropheCMS-maintained sanitize-html package bypasses allowedTags enforcement for text inside nonTextTagsArray elements (textarea and option). ApostropheCMS version 4.28.0 is affected through its dependency on the vulnerable sanitize-html version. The code at packages/sanitize-html/index.js:569-573 incorrectly assumes that htmlparser2 does not decode entities inside these elements and skips escaping, but htmlparser2 10.x does decode entities before passing text to the ontext callback. As a result, entity-encoded HTML is decoded by the parser and then written directly to the output as literal HTML characters, completely bypassing the allowedTags filter. An attacker can inject arbitrary tags including XSS payloads through any allowed option or textarea element using entity encoding. This affects non-default configurations where option or textarea are included in allowedTags, which is common in form builders and CMS platforms. This issue has been fixed in version 2.17.2 of sanitize-html and 4.29.0 of ApostropheCMS.

公表日 2026年4月16日6:17
登録日 2026年4月17日4:12
最終更新日 2026年4月26日3:15
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:a:apostrophecms:apostrophecms:4.29.0:*:*:*:*:*:*:*
cpe:2.3:a:apostrophecms:sanitize-html:*:*:*:*:*:node.js:*:* 2.17.1
関連情報、対策とツール
共通脆弱性一覧