The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-40682

CVE-2026-40682: Apache OpenNLP XXE Vulnerability

CVE-2026-40682 is an XML External Entity flaw in Apache OpenNLP that enables local file disclosure and SSRF attacks through crafted dictionary files. This article covers technical details, affected versions, and mitigation.

Published: May 7, 2026

CVE-2026-40682 Overview

CVE-2026-40682 is an XML External Entity (XXE) vulnerability [CWE-611] in Apache OpenNLP. The flaw resides in the DictionaryEntryPersistor class, which initializes a static SAXParserFactory at class-load time without enabling FEATURE_SECURE_PROCESSING or disabling DTD processing. Attackers who can supply a crafted dictionary file can trigger local file disclosure or server-side request forgery (SSRF) during SAX parsing. The vulnerability affects Apache OpenNLP versions before 2.5.9 and before 3.0.0-M3. The public Dictionary(InputStream) constructor is the documented API for loading user-supplied dictionaries, making untrusted input a realistic exposure path.

Critical Impact

Remote attackers can read arbitrary files from the host or pivot to internal network resources through SSRF by submitting a malicious XML dictionary file, with no authentication or user interaction required.

Affected Products

  • Apache OpenNLP versions before 2.5.9
  • Apache OpenNLP 3.0.0-M1
  • Apache OpenNLP 3.0.0-M2

Discovery Timeline

  • 2026-05-04 - CVE CVE-2026-40682 published to NVD
  • 2026-05-06 - Last updated in NVD database

Technical Details for CVE-2026-40682

Vulnerability Analysis

The DictionaryEntryPersistor class parses XML dictionary files using a SAXParserFactory configured only with namespace support. External entity resolution and DOCTYPE declarations remain enabled. When create(InputStream, EntryInserter) is invoked, the underlying XMLReader resolves any entity references defined in a DOCTYPE block before the application processes a single dictionary entry.

This behavior is inconsistent with the project's own XmlUtil.createSaxParser() helper, which correctly sets FEATURE_SECURE_PROCESSING and disallow-doctype-decl. All other XML parsing paths in the codebase use the secure helper. The persistor path was missed during hardening.

Root Cause

The root cause is missing XML parser hardening. The static SAXParserFactory instance never receives the security features that block external entity expansion. Because the factory is initialized at class load and reused for all parse operations, every call to the persistor inherits the unsafe configuration. This maps to [CWE-611] Improper Restriction of XML External Entity Reference.

Attack Vector

An attacker supplies a dictionary file (for example, a stop-word list or domain dictionary) that contains a malicious DOCTYPE declaration. When the application loads the file via Dictionary(InputStream), the SAX parser resolves entities defined in the DOCTYPE. A file:// reference triggers local file disclosure. An http:// reference triggers SSRF against internal services. Exploitation requires no authentication and no user interaction over the network.

No public proof-of-concept code is available. See the Apache Thread Discussion and the Openwall OSS Security Update for technical details.

Detection Methods for CVE-2026-40682

Indicators of Compromise

  • Dictionary XML files containing <!DOCTYPE declarations or <!ENTITY definitions referencing external URIs.
  • Outbound network connections from the OpenNLP host to unexpected internal or external endpoints during dictionary loads.
  • Java process file reads against sensitive paths such as /etc/passwd, /etc/shadow, or application configuration files immediately after dictionary parsing.
  • Application logs showing SAX parser activity tied to user-supplied dictionary inputs.

Detection Strategies

  • Inspect XML dictionary inputs at ingest for DOCTYPE and ENTITY tokens before they reach DictionaryEntryPersistor.
  • Audit dependency manifests for Apache OpenNLP versions earlier than 2.5.9 or 3.0.0-M3.
  • Correlate JVM file-read and outbound HTTP events with calls into opennlp-tools classes via runtime tracing.

Monitoring Recommendations

  • Alert on outbound connections initiated by Java services that host OpenNLP and that do not normally make egress requests.
  • Monitor read access to credential and configuration files by application service accounts.
  • Track the volume and origin of uploaded dictionary files in applications that expose this functionality to users.

How to Mitigate CVE-2026-40682

Immediate Actions Required

  • Upgrade Apache OpenNLP 2.x deployments to 2.5.9 and 3.x deployments to 3.0.0-M3.
  • Restrict dictionary file sources to trusted, internally controlled origins until the upgrade is complete.
  • Enumerate all applications and pipelines that call Dictionary(InputStream) with externally sourced data.
  • Block egress from OpenNLP hosts to internal management interfaces and metadata services.

Patch Information

Apache has released fixed versions 2.5.9 and 3.0.0-M3. Both versions route dictionary parsing through the hardened XmlUtil.createSaxParser() helper, which sets FEATURE_SECURE_PROCESSING and disallow-doctype-decl. Refer to the Apache Thread Discussion for the official advisory.

Workarounds

  • Wrap calls to Dictionary(InputStream) with input validation that rejects any XML containing a DOCTYPE declaration before it reaches the parser.
  • Reject dictionary uploads that are not byte-for-byte identical to vetted, signed reference files.
  • Run OpenNLP-hosting services with network egress filtering that blocks file:// resolution paths and limits HTTP destinations to an allowlist.
bash
# Configuration example: validate dictionary input before parsing
# Reject any XML payload containing a DOCTYPE declaration
if grep -qiE '<!DOCTYPE|<!ENTITY' "$DICT_FILE"; then
  echo "Rejecting dictionary file: DOCTYPE/ENTITY detected"
  exit 1
fi

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXXE

  • Vendor/TechApache Opennlp

  • SeverityCRITICAL

  • CVSS Score9.1

  • EPSS Probability0.09%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-611
  • Technical References
  • Openwall OSS Security Update
  • Vendor Resources
  • Apache Thread Discussion
  • Related CVEs
  • CVE-2026-42440: Apache OpenNLP DoS Vulnerability

  • CVE-2026-42027: Apache OpenNLP RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English