SQL Server Management Studio Information Disclosure Vulnerability (CVE-2018-8532)
SSMS parses XMLA files with external entity references enabled, allowing an attacker to read arbitrary files. The attacker must convince a user to open a malicious file.
John Page - ApparitionSec Follow
Originally disclosed on Microsoft
Description
An information disclosure vulnerability exists in Microsoft SQL Server Management Studio (SSMS) when parsing a malicious XMLA file containing a reference to an external entity. An attacker who successfully exploited this vulnerability could read arbitrary files via an XML external entity declaration. To exploit the vulnerability, an attacker must entice a user on an affected SSMS server to open a specially crafted XMLA file. In an email attack scenario, an attacker could exploit the vulnerability by sending the specially crafted file to the user and then convincing the user to open the file. In a web-based attack scenario, an attacker could host a website (or leverage a compromised website that accepts or hosts user-provided content) that contains a specially crafted file designed to exploit the vulnerability. An attacker would have no way to force a user to visit the website. Instead, an attacker would have to convince a user to click a link and open the specially crafted file. The security update addresses the vulnerability by correcting how SQL Server Management Studio parses XML input.
FAQ
- What type of information could be disclosed by this vulnerability? The type of information that could be disclosed if an attacker successfully exploited this vulnerability is unauthorized file system access - reading from file system. 2. How can I ensure my computer is protected from this vulnerability? For all versions of SQL Server Management Studio installed on this computer, you can protect your system from this vulnerability by disabling DTD processing of XML query results. Please follow the steps described in the Workaround section.
SQL Server
SQL Server
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, SSMS did not disable DTD processing, so external entity declarations in XMLA files were resolved.
Impact
An attacker could read arbitrary files from the file system, but only if the user opens a crafted file.
What the attacker needed
Victim opens a malicious XMLA file
The fix
The vulnerability was fixed by correcting how SSMS parses XML input; a workaround is to disable DTD processing.
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 report has not been written yet. The Original tab links to the source.
XML files can include references to other files, called external entities. If a program processes these without restrictions, an attacker can trick it into reading local files. Here, opening a malicious file in a database tool could let an attacker read files 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.