Microsoft XMLDOM in IE can divulge information of local drive/network in error messages – XXE
The Microsoft XMLDOM parser in Internet Explorer returns different error messages when validating a DTD against local file paths, network shares, or drive letters, allowing an attacker to infer the existence of files, folders, drives, and local network hosts. The issue is limited to information disclosure and does not allow reading file contents.
soroush.me
Published on soroush.me
While I was testing a XML Injection vulnerability, I became interested in the W3Schools DTD Validator example that can only work in IE: http://www.w3schools.com/dtd/dtdvalidation.asp ([updated 24/10/2016] – link mirror: https://web.archive.org/web/20130424001426/http://w3schools.com/dtd/dtdvalidation.asp). As a…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the XMLDOM DTD parser in Internet Explorer does not normalise or restrict local file and network paths, and it exposes distinct error messages that reveal whether a target exists.
Impact
An attacker could use error messages to detect the existence of local files, folders, drives, and local network hosts, but cannot read file contents; the issue only works in Internet Explorer and is a low-impact information disclosure.
What the attacker needed
Victim uses Internet Explorer; victim visits a malicious page
How it was found
- Create a test page that uses the Microsoft XMLDOM object to validate a DTD with a controllable target path.
- Point the target at a local file path using the file protocol and observe the error message.
- Try network share paths such as \\localhost\windows\system32\calc.exe and observe the error message.
- Use the res:// protocol to test files on drives other than C: and observe the error messages.
- Use drive letters directly (e.g., c:\) to detect available drives by the error message returned.
- Send requests to local sites or IP addresses and use response timing to detect valid hosts.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When a web page asks Internet Explorer to check an XML document against a rule file (a DTD), the browser tries to load that rule file from wherever the page says. If the page points to a local file or network address, the browser's error message changes depending on whether that target exists. An attacker can use those different messages to learn what files, folders, drives, and local network hosts are present on the victim's computer.
What is XXE?
An XML parser resolves entities the attacker defines, reading local files or making the server send requests.