SQL Server Management Studio Information Disclosure Vulnerability (CVE-2018-8533)
SSMS parses XML query results with external entity processing enabled, so a crafted XML file can reference local files. An attacker who convinces a user to open such a file could read arbitrary files from the user's filesystem.
John Page - ApparitionSec Follow
Originally disclosed on Microsoft
Description
An information disclosure vulnerability exists in Microsoft SQL Server Management Studio (SSMS) when parsing malicious XML content 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 XML 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 when parsing XML query results, allowing external entity declarations to be resolved.
Impact
An attacker could read arbitrary files from the victim's filesystem, but only if the victim opens a crafted XML file.
What the attacker needed
Victim uses affected SSMS; victim opens a crafted XML file
How it was found
- Create a malicious XML file containing an external entity declaration.
- Send the file to the victim or host it on a website.
- Convince the victim to open the file in SSMS.
- The external entity is resolved and local file contents are disclosed.
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 contain special instructions called 'entities' that pull in content from elsewhere. If a program processes these without restrictions, an attacker can make it include the contents of a local file, which the program then shows back. Here, SQL Server Management Studio did that when opening a malicious XML file, letting 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.