Apache Software FoundationのApache OpenNLPにおけるXML 外部エンティティの脆弱性
タイトル Apache Software FoundationのApache OpenNLPにおけるXML 外部エンティティの脆弱性
概要

Apache OpenNLP の DictionaryEntryPersistor における未サニタイズ辞書解析を介した XML 外部エンティティ (XXE) 脆弱性です。この脆弱性は、FEATURE_SECURE_PROCESSING を有効にせずに SAXParserFactory を初期化し、外部エンティティや DOCTYPE 宣言が無効化されていないことで発生します。悪意のある DOCTYPE 宣言を含む細工された辞書ファイルを処理すると、ローカルファイルの情報漏洩やサーバー側リクエスト偽造(SSRF)を引き起こす可能性があります。2.x 系では 2.5.9、3.x 系では 3.0.0-M3 へのアップグレードが推奨されます。すぐにアップグレードできない場合は、信頼できる辞書ファイルのみを使用し、入力検証を行うことが推奨されます。

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

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

公表日 2026年5月4日0:00
登録日 2026年5月8日12:23
最終更新日 2026年5月8日12:23
CVSS3.0 : 緊急
スコア 9.1
ベクター CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
影響を受けるシステム
Apache Software Foundation
Apache OpenNLP 2.5.9 未満
Apache OpenNLP 3.0.0
CVE (情報セキュリティ 共通脆弱性識別子)
CWE (共通脆弱性タイプ一覧)
ベンダー情報
変更履歴
No 変更内容 変更日
1 [2026年05月08日]
  掲載
2026年5月8日12:23

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

XML External Entity (XXE) via Unsanitized Dictionary Parsing in Apache OpenNLP DictionaryEntryPersistor

Versions Affected: before 2.5.9, before 3.0.0-M3

Description: The DictionaryEntryPersistor class initializes a static SAXParserFactory at class-load time without enabling FEATURE_SECURE_PROCESSING or disabling DTD processing. When create(InputStream, EntryInserter) is invoked, the only feature set on the XMLReader is namespace support — external entity resolution and DOCTYPE declarations remain fully enabled. An attacker who can supply a crafted dictionary file (e.g., a stop-word list or domain dictionary) containing a malicious DOCTYPE declaration can trigger local file disclosure via file:// entity references or server-side request forgery via http:// entity references during SAX parsing, before the application processes a single dictionary entry. This is inconsistent with the project's own XmlUtil.createSaxParser() helper, which correctly sets FEATURE_SECURE_PROCESSING and disallow-doctype-decl and is used by all other XML parsing paths in the codebase. The public Dictionary(InputStream) constructor delegates directly to this method and is the documented API for loading user-supplied dictionaries, making untrusted input a realistic scenario.

Mitigation: 2.x users should upgrade to 2.5.9. 3.x users should upgrade to 3.0.0-M3. Users who cannot upgrade immediately should ensure that all dictionary files are sourced from trusted origins and should consider wrapping the Dictionary(InputStream) constructor with input validation that rejects any XML containing a DOCTYPE declaration before it reaches the parser.

公表日 2026年5月5日2:16
登録日 2026年5月5日4:06
最終更新日 2026年5月7日3:00
影響を受けるソフトウェアの構成
構成1 以上 以下 より上 未満
cpe:2.3:a:apache:opennlp:*:*:*:*:*:*:*:* 2.5.9
cpe:2.3:a:apache:opennlp:3.0.0:m1:*:*:*:*:*:*
cpe:2.3:a:apache:opennlp:3.0.0:m2:*:*:*:*:*:*
関連情報、対策とツール
共通脆弱性一覧