Hacking WordPress: SSRF via XML-RPC
The WordPress XML-RPC pingback.ping method was enabled and accepted a crafted XML request that made the server send an HTTP request to an attacker-controlled ngrok endpoint. An attacker could use this to confirm SSRF and enumerate other XML-RPC methods without authentication.
medium.com
Published on medium.com
Imagine this: you hand a messenger a sealed note and tell them, “Deliver this to that locked room.” The messenger doesn’t ask what’s inside or why it just delivers it.
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-RPC pingback.ping method was left enabled and did not restrict which URLs the server could request.
Impact
An unauthenticated attacker could make the WordPress server send requests to arbitrary destinations, which could be used to probe internal networks or confirm SSRF, though the text only demonstrates requests to an external monitoring server.
What the attacker needed
XML-RPC enabled on the WordPress site; No authentication required
How it was found
- Set up a public monitoring server using ngrok to receive requests.
- Craft an XML-RPC pingback.ping request in Burp Suite Repeater.
- Send the request to the WordPress site.
- Observe the incoming request in the ngrok logs.
- Send another request to enumerate other XML-RPC methods.
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.
SSRF (Server-Side Request Forgery) is when a server is tricked into making a request to a destination the attacker chooses. Here, WordPress's XML-RPC feature, which normally lets blogs notify each other about links, was used to make the server contact the researcher's own monitoring server. The researcher could see the incoming request and learn that the server would fetch attacker-supplied addresses.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.