Reading list
Learn XXE from real reports
An XML parser resolves entities the attacker defines, reading local files or making the server send requests.
12 reports, easiest first.
-
How Secure is Java’s SecureProcessing?
The SecureProcessing flag in Java's XML parser does not prevent XXE attacks, as demonstrated by a Spring Boot endpoint that still reads local files after enabling the flag. An attacker could exploit this to read arbitrary files from the server.
XML parsers can be tricked into reading local files or making network requests, which is called XXE. A setting called SecureProcessing sounds like it should stop this, but the author shows it does not for file reading. You need to use specific parser settings recommended by OWASP instead.
The lesson. Likely the SecureProcessing feature only limits some resource usage (like entity expansion) but does not disable external entity resolution, which is the core of XXE.
-
The Regex Said Safe. The Parser Disagreed. NASA’s Earth Science Platform Had a Critical Vulnerability.
A regex-based sanitizer failed to remove multi-line DOCTYPE declarations because the dot metacharacter does not match newlines, allowing XML external entity injection. An attacker could make the NASA server fetch external DTDs, leading to SSRF, cloud metadata exposure, internal service enumeration, blind file reads, and denial of service.
XML allows a document to define special 'entities' that pull in content from other places, including files or web addresses. If a server processes these without restrictions, an attacker can trick it into fetching internal resources or sending data out. Here, a filter tried to block the dangerous part but missed a version split across lines, so the server still processed it.
The lesson. The sanitizer used a regex where the dot did not match newlines, so multi-line DOCTYPE declarations bypassed removal, and the XML parser was not configured to disable external entity resolution.
-
GHSL-2023-056: XML external entity (XXE) in Jenkins External Monitor Job Plugin - CVE-2023-37942
The Jenkins External Monitor Job Plugin did not configure its XML parser to prevent XML external entity (XXE) attacks. An authenticated attacker with Job Build permission could send a crafted HTTP request that forces Jenkins to download and parse a malicious DTD, leading to arbitrary file read, server-side request forgery, or denial of service.
XML external entity (XXE) is a flaw where an XML parser processes special instructions that can read local files or make network requests. Here, the plugin accepted XML from a user and parsed it without disabling those dangerous features, so an attacker could make the server read files or contact other systems.
The lesson. The XML parser was created without disabling DTDs or external entity resolution.
-
GHSL-2022-129: XML External Entity (XXE) injection in GeoNode - CVE-2023-26043
GeoNode's style upload feature parses user-supplied SLD files with an XML parser that resolves external entities, allowing an attacker to read arbitrary files. A low-privileged user can upload a crafted SLD file and receive the contents of a local file in the response.
When a program reads XML data, it can be tricked into including the contents of local files if it processes special instructions called 'entities'. Here, the style upload feature did not disable this, so an attacker could make the server include a file like /etc/passwd in its response. This lets an attacker see files they should not have access to.
-
Unauthenticated XXE leading to SSRF and internal resource access
An unauthenticated XML endpoint processed external entities, allowing an attacker to make the server fetch internal and external resources. This enabled SSRF, internal service enumeration, in-band retrieval of internal HTTP responses, a file existence oracle, and remote archive retrieval with temporary file write.
XML documents can include references to outside files or web addresses, called external entities. If a server parses these without restrictions, an attacker can make the server fetch internal resources and sometimes see the results. Here, the server did exactly that, letting the attacker probe internal services and files.
The lesson. The XML parser was configured to resolve external entities and DTDs, and error messages exposed the results of those resolutions.
-
The File That Answered Back — XXE Hidden in Cell A2
An unauthenticated Excel upload endpoint parsed XLSX files with external entity resolution enabled, allowing an attacker to read arbitrary files from the server. The attacker could retrieve files such as win.ini and hosts by placing an XXE payload inside the worksheet XML.
An XLSX file is actually a ZIP archive containing XML files. If the server's XML parser is configured to allow external entities, an attacker can put a special instruction in the XML that tells the parser to read a local file and insert its contents into a cell. The server then returns that cell value in its response, leaking the file.
The lesson. Likely the .NET XML parser used to process the uploaded XLSX had external entity resolution enabled by default, and the developer did not disable it.
-
GHSL-2023-055: XML external entity (XXE) or server-side request forgery (SSRF) in SAML SSO Jenkins Plugin - CVE-2023-32991, CVE-2023-32992
The SAML SSO Jenkins plugin parsed user-supplied XML metadata with an insecurely configured parser, allowing external entity resolution and unvalidated URL fetching. An authenticated attacker could read local files, perform server-side request forgery, or cause denial of service.
The plugin lets a user give a web address for SAML metadata, then downloads and reads that file. Because it did not restrict what the file could contain or where it could point, an attacker could make the server fetch internal resources or read local files. This is dangerous because the server trusts the attacker's file too much.
The lesson. The plugin used an XML parser without disabling external entity resolution and fetched arbitrary URLs without validation.
-
XXE in Site Audit function exposing file and directory contents
The Site Audit function's XML processor was vulnerable to XXE when parsing a user-supplied sitemap.xml file. An attacker could read arbitrary files and list directory contents from the server.
When a website processes an XML file, it can be tricked into including external entities that refer to local files. This is called XXE (XML External Entity) injection. Here, the site audit tool downloaded a sitemap.xml file from a user-provided URL and processed it without disabling external entities, allowing an attacker to read files on the server.
The lesson. Likely the XML parser was not configured to disable external entity processing, allowing DTDs to define entities that read local files.
-
OpenOlat - XML external entity (XXE) injection (CVE-2024-28198)
The draw.io integration in OpenOlat parsed user-supplied SVG files with an XML parser that allowed external entities, so an attacker could read arbitrary files and perform server-side request forgery. The vulnerability was exploited on a standard installation to read files accessible to the application user.
XML external entity (XXE) is a flaw where an XML parser processes special instructions that can pull in data from other files or URLs. Here, the application used a default parser that allowed these instructions, so an attacker could make the server read local files and send their contents back in the response.
The lesson. The DrawioServiceImpl class used a default DocumentBuilder to parse user-controlled SVG files without disabling external entity processing.
-
Jenkins Swarm Plugin XML external entities information disclosure vulnerability
The Jenkins Swarm plugin's UDP discovery response parser is vulnerable to XML external entity injection, allowing an attacker on the same network to read arbitrary files from Swarm client systems. An attacker can respond to discovery broadcasts with a crafted XML payload to exfiltrate file contents.
When a Jenkins Swarm agent starts, it sends a broadcast message on the local network to find a Jenkins master. The plugin reads the XML reply without disabling external entities, a feature that lets XML pull in files from the machine. An attacker on the same network can send a malicious reply that makes the agent read local files and send their contents back.
The lesson. The XML parser used in getCandidateFromDatagramResponses() does not disable external entity resolution, allowing XXE.
-
ManageEngine OpManager Add UCS Device blind XXE vulnerability
A blind XML External Entity (XXE) vulnerability exists in the Add UCS Device functionality of ManageEngine OpManager 12.6.168. An attacker who can control the response from a device added via this feature can cause the server to make arbitrary HTTP requests, leading to SSRF.
XML External Entity (XXE) is a flaw where an application parses XML input that can include special instructions to fetch external resources. Here, the server trusts XML from a device it contacts, so an attacker controlling that device can make the server send requests to internal systems. This is called blind because the attacker does not see the response directly, but can still cause server-side request forgery (SSRF).
The lesson. The XML parser (DocumentBuilder) is used with default settings that allow external entities, and the XML comes from an attacker-controllable source.
-
That time I broke into an API and became a billionaire
A configuration change to allow XML on an internal API accidentally enabled XML parsing on all endpoints, leading to an XXE vulnerability. The attacker exploited this to read files, decompile the API, and discover an undocumented endpoint that allowed transferring arbitrary amounts of money.
The API was set up to only accept JSON data, but a change to support XML for a new service accidentally made all endpoints accept XML. XML has a feature that can be abused to read files from the server, which let the attacker download the API's code and find a hidden money-transfer feature.
The lesson. Likely a misconfiguration where enabling XML parsing for one endpoint inadvertently enabled it globally, and the XML parser was not secured against external entities.