Server Side Request Forgery - A Forged Document

Summary :

Server Side Request Forgery (SSRF) attacks are used to target internal systems that are behind firewalls and are not accessible from the external network. SSRF attacks can be exploited to access internally running services like SSH, Local-Host, FTP, Gopher etc. In a normal SSRF attack, the attacker might cause the server to make a connection to internal-only services within the organization’s infrastructure.

Description :

I have found this server side request forgery vulnerability on a private bugcrowd program. The program was having an option to upload the documents where there was no validation on the uploaded file type. It was allowing all the files to get uploaded. So I simply wrote the payload and saved the file as .html and uploaded it. After some time I got the pingbacks on my burp collaborator server, so I checked the IP address using whois command and it was of the company itself but was different from the IP of my target and was not accessible from the internet. It was a basic SSRF attack where I was able to find the internal IP but was not able to exploit it further. The bug got triaged as P3 and I was rewarded bounty of 500 USD. Later the severity was changed to P4.

How I found this vulnerability ?

  1. I created an account and after logging in I got the option of uploading the document
Document Upload

2. I started burp collaborator client for generating the payload and copied the payload by clicking on “Copy to clipboard”

Burp Collaborator Client
Copy to clipboard

3. I created .html file with the code and pasted the copied payload and saved the file


4. I uploaded the .html file on my target website

Uploading File

5. After sometime I got the pingbacks on my burp collaborator client

Internal Ping-backs

Why it happened ?

In my opinion,

When I uploaded the .html file to the server, the server read the content of the file and tried to fetch the image from my burp collaborator client using its internal IP which got reflected on my burp collaborator client.

Exploit Code :

<img src=http://<BurpCollaboratorURL></img>

Then save it as .html and upload it.

Impact :

An attacker can exploit trust relationships to escalate an attack from the vulnerable application and perform unauthorized actions.

Mitigation :

A good way to mitigate ssrf attacks is to whitelist IP address or DNS name that the application needs to access. There is no universal fix to SSRF because it highly depends on the application functionality and business requirements.

In my case the mitigation should be that, that an application should only allow image files like pdf, png, jpeg, tiff etc to upload.




|Penetration Tester| |Hack The Box| |Digital Forensics| |Malware Analysis|

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

If I Had 🚢 #Ship30for30 To Do All Over Again, This is How I’d Do It Differently

Breaking the fear of learning

Unity: How I fixed my Vscode intellisense not working.

Day 46 of Game Dev: Adding Emissions to textures for your Unity project!

RCE Exploits of Redis Based on Master-Slave Replication

How TORO Cloud killed the API connector

Actinium’s Lightning Network with LND and Joule-extension

Make your Build Pipelines run faster — Pipeline Cache (Part 1)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jerry Shah (Jerry)

Jerry Shah (Jerry)

|Penetration Tester| |Hack The Box| |Digital Forensics| |Malware Analysis|

More from Medium

Open Redirection - QR Code Magic

Exploiting S3 bucket with path folder to Access PII info of A BANK

A Summary Of Fancy Attack Injection Methods — Part 3

Hunting for Bugs in File Upload Feature: