XML external entity injection (also known as XXE) is a web security vulnerability that allows an attacker to interfere with an application's processing of XML data. It occurs when user input that contains a reference to an defined external entity is processed in an unsafe way on the server-side. This may mean that the application returns the value of the defined external entity within its responses.
You can use Burp to test for XXE injection vulnerabilities:
You can follow this process using a lab with an XXE injection vulnerability. For example, Exploiting XXE using external entities to retrieve files.
If you're using Burp Suite Professional, you can use Burp Scanner to test for XXE vulnerabilities:
You can also use Burp Repeater to test for XXE vulnerabilities. This process also enables you to exploit XXE vulnerabilities, and closely investigate any issues that Burp Scanner has identified:
Insert an XXE payload into the XML string. The payload should define an XML entity and contain a system identifier as a value. The system identifier could be, for example, a file path or URL. For example, this payload defines the entity &xxe; with a value of the /etc/passwd file:
<!DOCTYPE foo [<!ENTITY xxe SYSTEM "file:///etc/passwd"> ]>
Replace a data value in the XML with your defined XML entity.