XML-RPC Server-Side Request Forgery: How I Discovered a Critical
The XML-RPC pingback.ping method in WordPress does not validate the URL it requests, allowing an unauthenticated attacker to make the server send requests to arbitrary internal or external addresses. This could be used for denial of service, internal network scanning, or accessing hidden services.
Published on akashmadanu.medium.com
That knowledge was the foundation. But then I started exploring deeper.
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 insufficient input validation on the URL passed to the pingback.ping method, allowing requests to arbitrary destinations.
Impact
An attacker could use the server to perform denial of service, scan internal networks, access hidden services, or chain with other vulnerabilities, all without authentication.
What the attacker needed
WordPress site with XML-RPC enabled; pingback.ping method available; no authentication required
The fix
Disable XML-RPC entirely, or if it must be kept, disable the pingback.ping method and restrict outbound requests to approved services.
How it was found
- Check if XML-RPC is enabled by visiting /xmlrpc.php and looking for the message 'XML-RPC server accepts POST requests only'.
- Send a POST request with a system.listMethods XML call to list available methods and confirm pingback.ping is present.
- Set up a simple web server on your own machine to receive requests.
- Send a POST request with a pingback.ping XML payload containing your server URL and a valid post URL from the target site.
- Check your server logs to see if the target server made a request to your server, proving the SSRF.
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-RPC is a feature in WordPress that lets other programs talk to your site. The pingback part is supposed to check links between blogs, but it can be tricked into making requests to any address, even internal ones. This means an attacker can use your site to probe or attack other systems without logging in.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.