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
    • 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-2025-46726

CVE-2025-46726: Langroid XXE Vulnerability

CVE-2025-46726 is an XML External Entity (XXE) vulnerability in Langroid framework that can lead to DoS attacks and exposure of sensitive local files. This article covers technical details, affected versions, and mitigation.

Published: March 18, 2026

CVE-2025-46726 Overview

Langroid, a framework for building large-language-model-powered applications, contains an XML External Entity (XXE) vulnerability in its XMLToolMessage class. Prior to version 0.53.4, applications leveraging this class are exposed to untrusted XML input that could result in Denial of Service (DoS) attacks and/or exposure of local files containing sensitive information. This vulnerability affects the XML parsing functionality where entity resolution was not properly disabled, allowing attackers to craft malicious XML payloads.

Critical Impact

Attackers can exploit this XXE vulnerability to cause service disruption through DoS attacks or exfiltrate sensitive local files from the server, potentially exposing configuration files, credentials, or other confidential data processed by LLM-powered applications.

Affected Products

  • Langroid versions prior to 0.53.4
  • Applications using the XMLToolMessage class for XML processing
  • LLM-powered applications built with vulnerable Langroid versions

Discovery Timeline

  • 2025-05-05 - CVE-2025-46726 published to NVD
  • 2025-08-01 - Last updated in NVD database

Technical Details for CVE-2025-46726

Vulnerability Analysis

This vulnerability stems from improper XML parser initialization in the XMLToolMessage class within langroid/agent/xml_tool_message.py. The vulnerable code created an XMLParser instance without disabling dangerous features such as entity resolution, DTD loading, and network access. This configuration allows attackers to inject malicious XML payloads containing external entity declarations that can reference local files or trigger recursive entity expansion attacks (billion laughs attack).

The vulnerability enables two primary attack scenarios: First, attackers can craft XML documents with external entity references pointing to local files like /etc/passwd or application configuration files, causing the parser to include their contents in the response. Second, attackers can leverage recursive entity expansion to cause resource exhaustion, leading to Denial of Service conditions.

Root Cause

The root cause is the insecure default configuration of the lxml.etree.XMLParser object. The original implementation only specified strip_cdata=False without implementing security-hardening flags. This left the parser vulnerable to XML External Entity (XXE) attacks, billion laughs attacks, and external DTD attacks because entity resolution remained enabled by default.

Attack Vector

The attack vector is network-based, requiring no authentication or user interaction. An attacker can submit crafted XML input to any LLM application using the vulnerable XMLToolMessage class. The malicious XML could contain external entity declarations designed to read local files or cause resource exhaustion through recursive entity expansion.

python
# Security patch in langroid/agent/xml_tool_message.py
# Source: https://github.com/langroid/langroid/commit/36e7e7db4dd1636de225c2c66c84052b1e9ac3c3

         Raises:
             etree.XMLSyntaxError: If the input string is not valid XML.
         """
-        parser = etree.XMLParser(strip_cdata=False)
+        # SECURITY: Initialize XMLParser with flags to prevent 
+        # XML External Entity (XXE), billion laughs, and external DTD attacks by 
+        # disabling entity resolution, DTD loading, and network access;
+        # `strip_cdata=False` is needed to preserve
+        # content within CDATA sections (e.g., for code).        
+        parser = etree.XMLParser(
+            strip_cdata=False,
+            resolve_entities=False,
+            load_dtd=False,
+            no_network=True,
+        )
         root = etree.fromstring(formatted_string.encode("utf-8"), parser=parser)

         def parse_element(element: etree._Element) -> Any:

Detection Methods for CVE-2025-46726

Indicators of Compromise

  • Unusual XML payloads containing <!DOCTYPE declarations with <!ENTITY definitions in application logs
  • Attempted file access to sensitive system files like /etc/passwd, /etc/shadow, or application configuration files from the Langroid process
  • Excessive memory or CPU consumption during XML parsing operations indicating potential billion laughs attack
  • Network requests originating from the XML parser attempting to fetch external DTDs or entities

Detection Strategies

  • Monitor application logs for XML input containing external entity declarations or DTD references
  • Implement file access auditing to detect unauthorized reads of sensitive system files by the Langroid application process
  • Deploy runtime application self-protection (RASP) solutions to detect and block XXE exploitation attempts
  • Use web application firewalls (WAF) with XXE detection rules to filter malicious XML payloads at the network perimeter

Monitoring Recommendations

  • Enable verbose logging for the XMLToolMessage class to capture all XML parsing operations
  • Set up alerts for unusual resource consumption patterns (CPU, memory) during XML processing
  • Monitor outbound network connections from the application server that may indicate external entity resolution attempts
  • Implement log aggregation to correlate XML parsing events with file access patterns across your LLM application infrastructure

How to Mitigate CVE-2025-46726

Immediate Actions Required

  • Upgrade Langroid to version 0.53.4 or later immediately to apply the security fix
  • Audit all LLM applications using Langroid to identify those leveraging the XMLToolMessage class
  • Review application logs for evidence of exploitation attempts before patching
  • Consider temporarily disabling XML-based tool messaging if immediate patching is not possible

Patch Information

The vulnerability has been addressed in Langroid version 0.53.4. The fix implements secure XML parser initialization by adding the flags resolve_entities=False, load_dtd=False, and no_network=True to prevent XXE attacks. The patch also updates the lxml dependency requirement from versions <5.0.0,>=4.9.3 to <6.0.0,>=5.4.0 for additional security improvements.

For detailed information, refer to the GitHub Security Advisory and the security patch commit.

Workarounds

  • If upgrading is not immediately possible, implement input validation to reject XML documents containing DOCTYPE declarations before they reach the XMLToolMessage class
  • Deploy a web application firewall (WAF) with rules to block XXE payloads targeting your LLM applications
  • Isolate Langroid applications in sandboxed environments with restricted file system access to limit the impact of successful exploitation
  • Consider switching to JSON-based tool messaging as an alternative to XML until the patch can be applied
bash
# Configuration example - Upgrade Langroid to patched version
pip install langroid>=0.53.4

# Verify the installed version
pip show langroid | grep Version

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

  • Vulnerability Details
  • TypeXXE

  • Vendor/TechLangroid

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.45%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:H/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-611
  • Technical References
  • GitHub Code Snippet
  • Vendor Resources
  • GitHub Commit Record

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-25481: Langroid Framework RCE Vulnerability

  • CVE-2025-46725: Langroid Python Framework RCE Vulnerability

  • CVE-2025-46724: Langroid Langroid RCE Vulnerability
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