Blind XML External Entities Out-Of-Band Channel Vulnerability : PayPal Case Study
The PayPal Multi-Order Shipping application parsed XML input with external entities enabled, allowing an attacker to make the server send requests to an attacker-controlled host. By using an external DTD and a custom FTP server on port 443, the attacker could exfiltrate local files such as /etc/passwd and later internal configuration files, potentially leading to remote code execution.
Published on r00thunt.com
XML External Entities weakness resides in the application’s XML input parsing capabilities. This attack occurs when XML input containing a reference to an external entity is processed by a weakly configured XML parser.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the XML parser was configured to resolve external entities and external DTDs, and the application did not disable this feature.
Impact
An attacker with no privileges and no user interaction could read local files and internal configuration data, and the report claims this could lead to remote code execution, though the RCE details are not shared.
What the attacker needed
No privileges required; no user interaction; attacker-controlled server
How it was found
- Intercept XML requests sent by the application to the server.
- Replace a value with an inline entity to check if entities are interpreted.
- Observe an invalid input error showing the injected payload is reflected.
- Try to extract a remote file using an external entity but find no direct response.
- Inject an XML payload using an external entity in the DOCTYPE with the SYSTEM keyword.
- Receive a connection from a PayPal internal server, confirming external entities are active.
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 write-up has not been written yet. The Original tab links to the source.
XML is a data format that can include special instructions called entities. If a server is not configured securely, it may follow an entity that points to an outside file or web address, letting an attacker read files on the server or make the server contact other systems. Here the attacker used this to steal files from PayPal's server and send them to a server they controlled.
What is XXE?
An XML parser resolves entities the attacker defines, reading local files or making the server send requests.