Skip to content
DoS Write-up Intermediate

Interesting XML Processing in Copy/Paste in Word and Outlook

Word and Outlook parse the DTD section of XML content pasted into a document or email, so a crafted XML message with many nested entities can cause a denial of service. The DTD could also be used to make the application probe files on the local file system within the PATH environment variable.

soroush.me

Published on soroush.me

This issue was not considered to be a security issue based on “Definition of a Security Vulnerability” in https://msdn.microsoft.com/en-us/library/cc751383.aspx as I have been told by Microsoft MSRC team. I thought it can be interesting to some people, so I am sharing the details here.

The author, on soroush.me

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 XML parser used for pasted content resolves DTD entities without limits and allows file-system lookups, so entity expansion and local file probing are possible.

Impact

A victim who pastes the crafted XML could experience a denial of service, and the DTD could cause requests to files on the local file system within the PATH, but external requests and files outside the PATH could not be reached.

What the attacker needed

Victim pastes crafted XML; Office 2010 Word or Outlook; attacker can place data in clipboard

How it was found

  1. Put the crafted XML into a plain text file to strip formatting.
  2. Copy the XML text.
  3. Paste it into a new Outlook email or a Word document.
  4. Observe the denial of service or the file-system requests.

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.

XML documents can contain a header section called a DTD that defines shortcuts called entities. Word and Outlook read that header when you paste XML, and a document that defines entities referring to each other many times can make the program work extremely hard and hang. The same header can also name a file, which makes the program look for that file on your computer.

What is DoS?

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.

Similar reports

View all

Same bug class and techniques, clearest first.

Denial of service

The lesson behind this report.

A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.