How I hacked a website just by looking at the source code Part-2
The WordPress XML-RPC endpoint was exposed and accepted unauthenticated pingback.ping requests, letting an attacker make the server send outbound HTTP requests to a domain they control. This blind SSRF could reveal the server's origin IP and network position, potentially reach internal hosts, and be abused as a DDoS reflector.
infosecwriteups.com
Published on infosecwriteups.com
FREE LINK
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 WordPress XML-RPC pingback feature was left enabled and reachable without authentication, so the server fetches any URL supplied in a pingback request.
Impact
An attacker could make the server contact arbitrary external or internal addresses, potentially leaking its origin IP and network position, reaching internal services or cloud metadata, and using the site as a DDoS reflector; no authentication is needed.
What the attacker needed
Xmlrpc.php reachable and pingback enabled; an out-of-band listener domain; no authentication needed
How it was found
- Visit the site's xmlrpc.php endpoint and check whether it is accessible or returns a forbidden response.
- Set up an out-of-band listener such as Burp Collaborator or Interactsh and note its unique callback URL.
- Send a pingback.ping XML request to xmlrpc.php with the listener URL as the source and the target site as the target.
- Watch the listener for incoming DNS or HTTP requests from the server.
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 sites notify it when they link to it, called a pingback. The server then fetches the linking page to check it exists. Because anyone can send that notification without logging in, an attacker can make the server visit any address they choose, which is called server-side request forgery (SSRF).
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.