The SSRF vulnerability in wkhtmltopdf can be triggered by inserting an iframe that points to an internal asset’s IP address or a local file, causing the tool to fetch the embedded resource.

Now read /tmp/root.txt – that’s your RPD.

To execute this attack, our local server needs to be accessible from the internet. ngrok is the perfect tool for this.

Because the application filters out any direct payload string containing file:// or 127.0.0.1 , we cannot provide a malicious URI straight into the input form. We must orchestrate an exploitation chain:

In /home/john/user.txt

Submit a benign live website (e.g., http://google.com ) to check if the app functions properly.

I tested the steps against the latest version of PDFy (retired but still available on VIP HTB). Every command worked as described, including: