CVE-2026-40682
Apache OpenNLP: XXE via Dictionary Parsing in DictionaryEntryPersistor
Description
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.
INFO
Published Date :
May 4, 2026, 5:16 p.m.
Last Modified :
Oct. 26, 2026, 7:10 p.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | |||||
| CVSS 3.1 | CRITICAL | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | ||||
| CVSS 3.1 | HIGH | 0b0ca135-0b70-47e7-9f44-1890c2a1c46c |
Solution
- Upgrade to Apache OpenNLP version 2.5.9 or 3.0.0-M3.
- Validate dictionary XML for DOCTYPE declarations.
- Ensure all dictionary files are from trusted origins.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2026-40682.
| URL | Resource |
|---|---|
| https://lists.apache.org/thread/r6jpt0qr9nj67gqhppqg7jxf8vsbo0w6 | Mailing List Vendor Advisory |
| http://www.openwall.com/lists/oss-security/2026/05/01/19 | Mailing List Third Party Advisory |
| https://access.redhat.com/security/cve/CVE-2026-40682 | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2466484 | |
| https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40682.json |
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2026-40682 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2026-40682
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2026-40682 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2026-40682 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Translated by [email protected]
Oct. 26, 2026
Action Type Old Value New Value Added Translation Title: Apache OpenNLP de Apache Software Foundation, Description: Entidad Externa XML (XXE) a través de Análisis de Diccionario no Saneado en Apache OpenNLP DictionaryEntryPersistor Versiones Afectadas: anteriores a 2.5.9, anteriores a 3.0.0-M3 Descripción: La clase DictionaryEntryPersistor inicializa una SAXParserFactory estática en el momento de la carga de la clase sin habilitar FEATURE_SECURE_PROCESSING o deshabilitar el procesamiento de DTD. Cuando se invoca create(InputStream, EntryInserter), la única característica configurada en el XMLReader es el soporte de espacios de nombres - la resolución de entidades externas y las declaraciones DOCTYPE permanecen completamente habilitadas. Un atacante que puede proporcionar un archivo de diccionario manipulado (por ejemplo, una lista de palabras vacías o un diccionario de dominio) que contiene una declaración DOCTYPE maliciosa puede desencadenar la divulgación de archivos locales a través de referencias de entidad file: // o falsificación de petición del lado del servidor a través de referencias de entidad http:// durante el análisis SAX, antes de que la aplicación procese una sola entrada de diccionario. Esto es inconsistente con el ayudante XmlUtil.createSaxParser() propio del proyecto, que configura correctamente FEATURE_SECURE_PROCESSING y disallow-doctype-decl y es utilizado por todas las demás rutas de análisis XML en la base de código. El constructor público Dictionary(InputStream) delega directamente en este método y es la API documentada para cargar diccionarios proporcionados por el usuario, lo que convierte la entrada no confiable en un escenario realista. Mitigación: Los usuarios de 2.x deberían actualizar a 2.5.9. Los usuarios de 3.x deberían actualizar a 3.0.0-M3. Los usuarios que no puedan actualizar inmediatamente deberían asegurarse de que todos los archivos de diccionario provengan de orígenes confiables y deberían considerar envolver el constructor Dictionary(InputStream) con validación de entrada que rechace cualquier XML que contenga una declaración DOCTYPE antes de que llegue al analizador. -
CVE Modified by 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
Sep. 02, 2026
Action Type Old Value New Value Added Affected Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/40xxx/CVE-2026-40682.json">CVE-2026-40682</a> Added Reference https://access.redhat.com/security/cve/CVE-2026-40682 Added Reference https://bugzilla.redhat.com/show_bug.cgi?id=2466484 Added Reference https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40682.json Removed Reference https://access.redhat.com/security/cve/CVE-2026-40682 Removed Reference https://bugzilla.redhat.com/show_bug.cgi?id=2466484 Removed Reference https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40682.json -
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Sep. 02, 2026
Action Type Old Value New Value Added Reference http://www.openwall.com/lists/oss-security/2026/05/01/19 Removed Reference http://www.openwall.com/lists/oss-security/2026/05/01/19 Removed Reference Type http://www.openwall.com/lists/oss-security/2026/05/01/19 Types: Mailing List, Third Party Advisory -
CVE Modified by [email protected]
Sep. 02, 2026
Action Type Old Value New Value Added Reference https://lists.apache.org/thread/r6jpt0qr9nj67gqhppqg7jxf8vsbo0w6 Removed Reference https://lists.apache.org/thread/r6jpt0qr9nj67gqhppqg7jxf8vsbo0w6 Removed Reference Type https://lists.apache.org/thread/r6jpt0qr9nj67gqhppqg7jxf8vsbo0w6 Types: Mailing List, Vendor Advisory -
CVE Modified by 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
Jul. 15, 2026
Action Type Old Value New Value Changed Affected [{'cpes': ['cpe:/a:redhat:camel_spring_boot:4'], 'vendor': 'Red Hat', 'product': 'Red Hat build of Apache Camel for Spring Boot 4', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:jboss_data_grid:8'], 'vendor': 'Red Hat', 'product': 'Red Hat Data Grid 8', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:jboss_fuse:7'], 'vendor': 'Red Hat', 'product': 'Red Hat Fuse 7', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:jboss_enterprise_application_platform:8'], 'vendor': 'Red Hat', 'product': 'Red Hat JBoss Enterprise Application Platform 8', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:jbosseapxp'], 'vendor': 'Red Hat', 'product': 'Red Hat JBoss Enterprise Application Platform Expansion Pack', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:openshift_ai'], 'vendor': 'Red Hat', 'product': 'Red Hat OpenShift AI (RHOAI)', 'defaultStatus': 'unknown'}] [{'cpes': ['cpe:/a:redhat:camel_spring_boot:4'], 'vendor': 'Red Hat', 'product': 'Red Hat build of Apache Camel for Spring Boot 4', 'packageName': 'opennlp-tools', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:jboss_data_grid:8'], 'vendor': 'Red Hat', 'product': 'Red Hat Data Grid 8', 'packageName': 'opennlp-tools', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:jboss_fuse:7'], 'vendor': 'Red Hat', 'product': 'Red Hat Fuse 7', 'packageName': 'opennlp-maxent', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:jboss_fuse:7'], 'vendor': 'Red Hat', 'product': 'Red Hat Fuse 7', 'packageName': 'opennlp-tools', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:jboss_enterprise_application_platform:8'], 'vendor': 'Red Hat', 'product': 'Red Hat JBoss Enterprise Application Platform 8', 'packageName': 'opennlp-tools', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:jbosseapxp'], 'vendor': 'Red Hat', 'product': 'Red Hat JBoss Enterprise Application Platform Expansion Pack', 'packageName': 'opennlp-tools', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:openshift_ai'], 'vendor': 'Red Hat', 'product': 'Red Hat OpenShift AI (RHOAI)', 'packageName': 'rhoai/odh-trustyai-service-rhel9', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unknown'}, {'cpes': ['cpe:/a:redhat:openshift_ai'], 'vendor': 'Red Hat', 'product': 'Red Hat OpenShift AI (RHOAI)', 'packageName': 'rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9', 'collectionURL': 'https://access.redhat.com/downloads/content/package-browser/', 'defaultStatus': 'unknown'}] -
CVE Modified by [email protected]
Jun. 30, 2026
Action Type Old Value New Value Changed Affected [{'vendor': 'Apache Software Foundation', 'product': 'Apache OpenNLP', 'versions': [{'status': 'affected', 'version': '2.0', 'lessThan': '2.5.9', 'versionType': 'semver'}, {'status': 'affected', 'version': '3.0', 'lessThan': '3.0.0-M3', 'versionType': 'semver'}, {'status': 'affected', 'version': '0', 'lessThan': '1.9.5', 'versionType': 'semver'}], 'packageName': 'org.apache.opennlp:opennlp-tools', 'collectionURL': 'https://repo.maven.apache.org/maven2/', 'defaultStatus': 'unaffected'}] [{'vendor': 'Apache Software Foundation', 'product': 'Apache OpenNLP', 'versions': [{'status': 'affected', 'version': '2.0', 'lessThan': '2.5.9', 'versionType': 'semver'}, {'status': 'affected', 'version': '3.0.0-M1', 'lessThan': '3.0.0-M3', 'versionType': 'semver'}, {'status': 'affected', 'version': '0', 'lessThan': '1.9.5', 'versionType': 'semver'}], 'packageName': 'org.apache.opennlp:opennlp-tools', 'collectionURL': 'https://repo.maven.apache.org/maven2/', 'defaultStatus': 'unaffected'}] -
CVE Modified by 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
Jun. 30, 2026
Action Type Old Value New Value Added Affected [{'cpes': ['cpe:/a:redhat:camel_spring_boot:4'], 'vendor': 'Red Hat', 'product': 'Red Hat build of Apache Camel for Spring Boot 4', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:jboss_data_grid:8'], 'vendor': 'Red Hat', 'product': 'Red Hat Data Grid 8', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:jboss_fuse:7'], 'vendor': 'Red Hat', 'product': 'Red Hat Fuse 7', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:jboss_enterprise_application_platform:8'], 'vendor': 'Red Hat', 'product': 'Red Hat JBoss Enterprise Application Platform 8', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:jbosseapxp'], 'vendor': 'Red Hat', 'product': 'Red Hat JBoss Enterprise Application Platform Expansion Pack', 'defaultStatus': 'unaffected'}, {'cpes': ['cpe:/a:redhat:openshift_ai'], 'vendor': 'Red Hat', 'product': 'Red Hat OpenShift AI (RHOAI)', 'defaultStatus': 'unknown'}] Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N Added CWE CWE-611 Added Reference https://access.redhat.com/security/cve/CVE-2026-40682 Added Reference https://bugzilla.redhat.com/show_bug.cgi?id=2466484 Added Reference https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40682.json -
CVE Modified by [email protected]
Jun. 29, 2026
Action Type Old Value New Value Changed Affected [{'vendor': 'Apache Software Foundation', 'product': 'Apache OpenNLP', 'versions': [{'status': 'affected', 'version': '0', 'lessThan': '2.5.9', 'versionType': 'semver'}, {'status': 'affected', 'version': '3.0', 'lessThan': '3.0.0-M3', 'versionType': 'semver'}], 'packageName': 'org.apache.opennlp:opennlp-tools', 'collectionURL': 'https://repo.maven.apache.org/maven2/', 'defaultStatus': 'unaffected'}] [{'vendor': 'Apache Software Foundation', 'product': 'Apache OpenNLP', 'versions': [{'status': 'affected', 'version': '2.0', 'lessThan': '2.5.9', 'versionType': 'semver'}, {'status': 'affected', 'version': '3.0', 'lessThan': '3.0.0-M3', 'versionType': 'semver'}, {'status': 'affected', 'version': '0', 'lessThan': '1.9.5', 'versionType': 'semver'}], 'packageName': 'org.apache.opennlp:opennlp-tools', 'collectionURL': 'https://repo.maven.apache.org/maven2/', 'defaultStatus': 'unaffected'}] -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
Jun. 17, 2026
Action Type Old Value New Value Added SSVC {'id': 'CVE-2026-40682', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'yes'}, {'technicalImpact': 'total'}], 'version': '2.0.3', 'timestamp': '2026-05-05T15:01:49.614474Z'} -
CVE Modified by [email protected]
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'vendor': 'Apache Software Foundation', 'product': 'Apache OpenNLP', 'versions': [{'status': 'affected', 'version': '0', 'lessThan': '2.5.9', 'versionType': 'semver'}, {'status': 'affected', 'version': '3.0', 'lessThan': '3.0.0-M3', 'versionType': 'semver'}], 'packageName': 'org.apache.opennlp:opennlp-tools', 'collectionURL': 'https://repo.maven.apache.org/maven2/', 'defaultStatus': 'unaffected'}] -
Initial Analysis by [email protected]
May. 06, 2026
Action Type Old Value New Value Added CPE Configuration OR *cpe:2.3:a:apache:opennlp:*:*:*:*:*:*:*:* versions up to (excluding) 2.5.9 *cpe:2.3:a:apache:opennlp:3.0.0:m1:*:*:*:*:*:* *cpe:2.3:a:apache:opennlp:3.0.0:m2:*:*:*:*:*:* Added Reference Type CVE: http://www.openwall.com/lists/oss-security/2026/05/01/19 Types: Mailing List, Third Party Advisory Added Reference Type Apache Software Foundation: https://lists.apache.org/thread/r6jpt0qr9nj67gqhppqg7jxf8vsbo0w6 Types: Mailing List, Vendor Advisory -
CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0
May. 05, 2026
Action Type Old Value New Value Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N -
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
May. 04, 2026
Action Type Old Value New Value Added Reference http://www.openwall.com/lists/oss-security/2026/05/01/19 -
New CVE Received by [email protected]
May. 04, 2026
Action Type Old Value New Value Added Description 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. Added CWE CWE-611 Added Reference https://lists.apache.org/thread/r6jpt0qr9nj67gqhppqg7jxf8vsbo0w6