CVE-2026-40682
Full vulnerability record from the local CVENow database.
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.
View original CVE JSON
{
"id": "CVE-2026-40682",
"sourceIdentifier": "[email protected]",
"published": "2026-05-04T17:16:23.657",
"lastModified": "2026-10-26T19:10:00.163",
"vulnStatus": "Modified",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "XML External Entity (XXE) via Unsanitized Dictionary Parsing in Apache OpenNLP DictionaryEntryPersistor\n\n\nVersions Affected: before 2.5.9, before 3.0.0-M3\n\n\nDescription: 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.\n\n\nMitigation: 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."
},
{
"lang": "es",
"value": "Entidad Externa XML (XXE) a través de Análisis de Diccionario no Saneado en Apache OpenNLP DictionaryEntryPersistor\n\nVersiones Afectadas: anteriores a 2.5.9, anteriores a 3.0.0-M3\n\nDescripció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.\n\nMitigació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."
}
],
"affected": [
{
"source": "[email protected]",
"affectedData": [
{
"vendor": "Apache Software Foundation",
"product": "Apache OpenNLP",
"defaultStatus": "unaffected",
"collectionURL": "https://repo.maven.apache.org/maven2/",
"packageName": "org.apache.opennlp:opennlp-tools",
"versions": [
{
"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",
"status": "affected"
}
]
}
]
},
{
"source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
"affectedData": [
{
"vendor": "Red Hat",
"product": "Red Hat build of Apache Camel for Spring Boot 4",
"defaultStatus": "unaffected",
"collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
"packageName": "opennlp-tools",
"cpes": [
"cpe:/a:redhat:camel_spring_boot:4"
]
},
{
"vendor": "Red Hat",
"product": "Red Hat Data Grid 8",
"defaultStatus": "unaffected",
"collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
"packageName": "opennlp-tools",
"cpes": [
"cpe:/a:redhat:jboss_data_grid:8"
]
},
{
"vendor": "Red Hat",
"product": "Red Hat Fuse 7",
"defaultStatus": "unaffected",
"collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
"packageName": "opennlp-maxent",
"cpes": [
"cpe:/a:redhat:jboss_fuse:7"
]
},
{
"vendor": "Red Hat",
"product": "Red Hat Fuse 7",
"defaultStatus": "unaffected",
"collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
"packageName": "opennlp-tools",
"cpes": [
"cpe:/a:redhat:jboss_fuse:7"
]
},
{
"vendor": "Red Hat",
"product": "Red Hat JBoss Enterprise Application Platform 8",
"defaultStatus": "unaffected",
"collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
"packageName": "opennlp-tools",
"cpes": [
"cpe:/a:redhat:jboss_enterprise_application_platform:8"
]
},
{
"vendor": "Red Hat",
"product": "Red Hat JBoss Enterprise Application Platform Expansion Pack",
"defaultStatus": "unaffected",
"collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
"packageName": "opennlp-tools",
"cpes": [
"cpe:/a:redhat:jbosseapxp"
]
},
{
"vendor": "Red Hat",
"product": "Red Hat OpenShift AI (RHOAI)",
"defaultStatus": "affected",
"collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
"packageName": "rhoai/odh-trustyai-service-rhel9",
"cpes": [
"cpe:/a:redhat:openshift_ai"
]
},
{
"vendor": "Red Hat",
"product": "Red Hat OpenShift AI (RHOAI)",
"defaultStatus": "affected",
"collectionURL": "https://access.redhat.com/downloads/content/package-browser/",
"packageName": "rhoai/odh-workbench-jupyter-trustyai-cpu-py312-rhel9",
"cpes": [
"cpe:/a:redhat:openshift_ai"
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
"baseScore": 9.1,
"baseSeverity": "CRITICAL",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "HIGH",
"availabilityImpact": "NONE"
},
"exploitabilityScore": 3.9,
"impactScore": 5.2
},
{
"source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"baseScore": 7.5,
"baseSeverity": "HIGH",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "HIGH",
"integrityImpact": "NONE",
"availabilityImpact": "NONE"
},
"exploitabilityScore": 3.9,
"impactScore": 3.6
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-05-05T15:01:49.614474Z",
"id": "CVE-2026-40682",
"options": [
{
"exploitation": "none"
},
{
"automatable": "yes"
},
{
"technicalImpact": "total"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "[email protected]",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-611"
}
]
},
{
"source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-611"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:apache:opennlp:*:*:*:*:*:*:*:*",
"versionEndExcluding": "2.5.9",
"matchCriteriaId": "3E73109B-BF5E-4832-B5DC-1747D3C42287"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:apache:opennlp:3.0.0:m1:*:*:*:*:*:*",
"matchCriteriaId": "57E14048-91DB-4673-9A7B-B15675B3994A"
},
{
"vulnerable": true,
"criteria": "cpe:2.3:a:apache:opennlp:3.0.0:m2:*:*:*:*:*:*",
"matchCriteriaId": "2E738486-C0BD-4FDB-8880-DBC2BA4C0D77"
}
]
}
]
}
],
"references": [
{
"url": "https://lists.apache.org/thread/r6jpt0qr9nj67gqhppqg7jxf8vsbo0w6",
"source": "[email protected]",
"tags": [
"Mailing List",
"Vendor Advisory"
]
},
{
"url": "http://www.openwall.com/lists/oss-security/2026/05/01/19",
"source": "af854a3a-2127-422b-91ae-364da2661108",
"tags": [
"Mailing List",
"Third Party Advisory"
]
},
{
"url": "https://access.redhat.com/security/cve/CVE-2026-40682",
"source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c"
},
{
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2466484",
"source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c"
},
{
"url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-40682.json",
"source": "0b0ca135-0b70-47e7-9f44-1890c2a1c46c"
}
]
}