Just another tale of severe bugs on a private program.
A server-side request forgery (SSRF) vulnerability allowed an attacker to make the server fetch internal AWS metadata by chaining an open redirect to bypass a domain allowlist. This exposed cloud credentials and potentially full cloud access. Additionally, an insecure direct object reference (IDOR) let attackers download other users' signature images, and a missing authorization check allowed refunds from other merchants' accounts.
Published on medium.com
It would be cool if you read my previous write up before you read this because it’s the same program and the only program that feeds me.
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.
Context
The target is a private bug bounty program run by a company that offers wallet and merchant services, including a QR payment system used by offline stores. The researcher had worked on the same program before and describes it as the only program he tests. The application exposes a partner-facing API under partner.redacted.com and serves merchant assets from cdn.redacted.com. The features touched in this write-up are an API endpoint that fetches a URL supplied by the client, a partner signup flow that asks for a scanned signature image, and the QR-based payment and refund flow used by merchants.
Setup
The researcher worked with his own account on the private program and, later, with a self-registered merchant account. He used a Python simple HTTP server to watch for outbound requests, a Python script to enumerate signature images, and VirusTotal to look for staging subdomains. No tool versions are given. The precondition for the first bug is that the tester can reach the partner API and that the application accepts a URL in a POST body.
Finding it
While browsing the application for endpoints to attack, the researcher came across a POST request of this shape:
URL:
POST Data:
{"URL":"https://subdomain.redacted.com","method":"GET"}
The body carries a URL and a method, which strongly suggests the server performs the request described in the body on the user's behalf. That is a server-side request forgery candidate. He replaced the URL with his own Python simple HTTP server and saw nothing: no request arrived on his terminal. The application applies a regex check on the URL, something like *.redacted.com, and only makes the request when the URL is one of the company's subdomains.
Exploitation
Step 1: Bypass the subdomain check with an open redirect
The researcher remembered an open redirect he had found earlier on the same program, which the company did not accept on its own without a major risk such as a token leak. The redirect takes a redirectUrl parameter, and the report's example URL is on a seller subdomain:
Putting the redirect URL into the URL parameter caused the server to follow the 302 to https://google.com and return the content of google.com. The regex check was satisfied by the first hop, and the redirect carried the request to an arbitrary destination.
Step 2: Point the chain at the cloud metadata endpoint
Knowing the company uses Amazon cloud services, he aimed the redirect at the instance metadata service:
and sent it in the body:

The image shows the metadata returned through the SSRF. The response contained the AWS metadata of the company's cloud, so the chain of open redirect, SSRF and metadata endpoint gave him access to the cloud metadata. He reported it and the company fixed it in about four hours, paying 40k INR (about 551 USD), which he says was the highest they pay.
Step 3: Repeat against staging
After the fix he was asked to verify it. He wondered whether the fix had been applied to the staging servers too. He went to virustotal.com, found the staging subdomains, replaced the production domains in the request with the staging ones and got the same result again. He sent a second report and received another 40k INR (about 550 USD).
Step 4: Enumerate other users' signature images
He signed up as a partner, where the flow asks for a scanned signature, and uploaded a fake image. Images are stored in S3 and served through cdn.redacted.com. He tried to bypass the upload policies and found no way in. Looking at the path of the uploaded image, it looked like this:
The path contains a numeric partner identifier followed by a fixed signature/signature.png. He wrote a Python script to check whether he could download other users' signatures, and the result is shown below.

The image shows signatures belonging to other users being downloaded. The company paid 15k INR (about 206 USD) for this report.
Step 5: Refund from another merchant's account
The QR payment system lets offline stores accept wallet payments: a shopkeeper gets a QR code and sticks it on the wall. After scanning a QR code, the client made a request like this:
{"request":{"qrCodeId":"QR_DATA_ASHDGVA","scanCompletedTime":"1530007755497"}}
The response contained the merchant identifier:
{....."MERCAHNT_ID":"SECRET_CODE",...}
He signed up as a merchant, paid a small amount to his own merchant account by QR, and performed a genuine refund. He then used the merchant id of another merchant and was able to refund from that merchant's account. The refund lacked verification of the merchant id against the session of the requesting account. According to the report this affected all offline merchant stores using the QR system across India, including IRCTC, India's e-ticketing website. He was paid 23k INR (about 317 USD).
Root cause
The SSRF protection was a regex on the URL that only allowed *.redacted.com. It validated the first host in the URL but not where that host would send the client, so an open redirect on an allowed subdomain turned the check into a formality. The metadata service at [redacted] was reachable from the application server, and the response was returned to the caller. The same chain worked against staging subdomains, so the production fix did not cover that environment.
The signature images were served from a predictable path built from a numeric partner identifier with a fixed filename, and access to that path was not tied to the requesting account. The refund flow trusted the merchant id supplied in the request without checking that it belonged to the session making the call, which is a missing authorisation check on an object identifier.
Impact
Through the SSRF chain the researcher obtained the AWS metadata of the company's cloud and states that he then had access to the entire cloud. The same chain worked against staging. The signature issue let him download other partners' signature images. The refund issue let him issue refunds from another merchant's account, and the report says it affected offline merchant stores using the QR system across India, including IRCTC. The report does not give the number of affected merchants or signatures.
Fix
The company fixed the SSRF within about four hours of the first report and asked him to verify it. The report does not describe the change that was made. The staging environment was still vulnerable when he retested, which suggests the fix had not been rolled out there.
Variants to test
- Put an allowed-domain URL that redirects elsewhere into any parameter the server fetches, and watch your own listener for the request. A positive result is an inbound request from the server to a host outside the allowlist.
- Point the same chain at
http://[redacted]/latest/meta-dataand look for metadata in the response. A positive result is instance metadata coming back in the body. - After a fix is confirmed on production, repeat the original request against staging and other non-production subdomains found through passive sources. A positive result is the same behaviour on an environment the fix missed.
- Take any asset URL with a numeric or otherwise guessable identifier and a fixed filename, and request it with another account's identifier. A positive result is another user's file being returned.
- In payment and refund flows, capture a request that carries a merchant or account identifier and substitute another identifier while keeping your own session. A positive result is a refund or state change on the other account.
What happened, in plain words
A security researcher spent several nights testing a private bug bounty program run by a company that offers wallet and merchant payment services. Over the course of a month he found four separate problems and was paid a total of 1,623 USD. The first problem let him make the company's own server fetch a web address of his choosing, which he used to reach a special internal address that Amazon cloud servers use to hand out their configuration details. The second was the same problem again, this time on a test copy of the website that the company had forgotten to fix. The third let him download the scanned signature images that other partners had uploaded. The fourth let him trigger a refund out of another merchant's account in the company's QR code payment system.
This article walks through each one slowly, assuming you have never done security testing before. Every technical word is explained the first time it appears, and there is a glossary at the end.
Some background you need first
What an API is
When you use a website, your browser asks the server for pages and the server sends back pages made of text and pictures. An API (Application Programming Interface) is a different door into the same server, meant for programs rather than people. Instead of sending back a pretty page, an API sends back raw data, usually in a format called JSON, which looks like a set of labelled boxes:
A program on your computer, or a script you write, can talk to an API directly. Many mobile apps and partner integrations do exactly this. Because APIs are meant for machines, they often accept instructions in the request body, and that is where interesting things can happen.
What a POST request is
When your browser loads a page by typing an address, it sends a GET request: "please give me this thing". When you submit a form, it usually sends a POST request: "here is some data, please do something with it". The data travels in the body of the request, separate from the address. A POST body can be JSON, as above.
What a subdomain is
A subdomain is a prefix on a domain name. If the company owns redacted.com, then partner.redacted.com and cdn.redacted.com are subdomains of it. Think of the domain as a building and subdomains as different departments inside it. The company controls all of them.
What a bug bounty program is
A bug bounty program is an arrangement where a company pays independent researchers for finding security problems and reporting them privately instead of exploiting them. A private program means only invited researchers can take part. The researcher in this story had been invited to this one before and had already been paid for earlier findings.
What the product does
The company runs a digital wallet and merchant payment service. Shops can accept wallet payments, including through a QR code (the square barcode you scan with a phone camera). A shopkeeper prints a QR code and sticks it on the wall; a customer scans it and pays. The company also has a partner programme, where other businesses sign up to integrate with the platform, and part of that signup asks for a scanned image of the partner's signature.
Setting up
The researcher used his own account on the private program, and later created his own merchant account. His tools were modest:
- A Python simple HTTP server: a tiny web server you can start on your own computer with one command. It prints a line every time something connects to it. Researchers use it as a tripwire: if the target server is secretly fetching addresses you supply, you will see the connection arrive on your own machine.
- A Python script to loop through numbers and download images, so he did not have to click hundreds of links by hand.
- VirusTotal, a public website where anyone can submit a file or a domain and see what is known about it. It also keeps records of domain names that have been seen in the wild, which is how he found the company's test servers.
The report does not give versions for any of these tools.
Finding the first bug
He was browsing the application, looking for places where the server accepts input, when he came across a POST request shaped like this:
URL:
POST Data:
{"URL":"https://subdomain.redacted.com","method":"GET"}
Line by line:
- The first block is the address the request is sent to. The part after the
?is the query string, a set of key and value pairs. Herechannel=12is one such pair. Query strings are just extra information attached to the address. - The second block is the body of the POST request, written in JSON. It has two fields:
URL, which holds a web address, andmethod, which holds the wordGET.
Why this matters: the body is literally telling the server "make a GET request to this URL". If the server obeys, then whoever sends the request can make the company's server visit any address on the internet. That is the classic setup for a vulnerability called SSRF, short for Server-Side Request Forgery. The everyday comparison: imagine you can hand a sealed envelope to a trusted courier and ask them to deliver it anywhere. The recipient sees the courier, not you, so they trust the delivery. In SSRF, the attacker borrows the server's ability to reach places the attacker cannot reach directly.
He tested it by putting the address of his own Python simple HTTP server into the URL field. If the company's server obeyed, his terminal would print a connection.
Nothing happened. No request arrived.
So the server was not blindly obeying. It was checking the URL first. The report says the check was a regex (a pattern-matching rule) something like *.redacted.com, meaning the URL had to be one of the company's own subdomains. Only then would the server make the request.
Step 1: Getting past the check with an open redirect
He remembered a separate bug he had found earlier on the same program: an open redirect. An open redirect is a page on a website that takes a destination address as a parameter and forwards the visitor there, without checking whether the destination is legitimate. The everyday comparison: a receptionist who will walk you to any room you name, including rooms in other buildings. The company had not accepted that bug on its own, because a redirect by itself does not leak anything sensitive. But combined with something else, it becomes powerful.
The redirect took a parameter called redirectUrl, and the report's example URL is on a seller subdomain:
Line by line:
https://partner.redacted.com/v1/apiis the address of the page that does the redirecting. It is on an allowed subdomain.?starts the query string.example=blablais a filler parameter. The report does not say what it does; it appears to be there just to make the request look normal.&separates parameters.redirectUrl=https://google.comtells the page where to send the visitor. Here it is Google.
He put this whole address into the URL field of the original request. The server made its request to the redirect page, which then sent it on to google.com. The server then made its request, arrived at the redirect page, and was told "go to google.com". It followed the redirect and came back with the content of google.com.
The check was satisfied by the first hop, and the redirect carried the request anywhere. This is the key idea: the check looked at where the request started, not where it ended up.
Step 2: Aiming at the cloud metadata address
He knew the company used Amazon cloud services. Amazon's cloud, like several others, gives every virtual server a special internal address, [redacted], that answers questions about the server itself: which account it belongs to, what permissions it has, and sometimes temporary credentials. This is called the instance metadata service. It is only reachable from inside the cloud network, never from the public internet, which is exactly why SSRF is dangerous: the company's server can reach it, and the attacker is borrowing the server.
He aimed the redirect at it:
Line by line:
- The first part is the same redirect page as before, which forwards to the metadata address.
redirectUrl=http://[redacted]/latest/meta-datanow points at the internal metadata address instead of Google. The path/latest/meta-datais the standard place where the metadata service lists what it can tell you.
And he sent it in the body:
Line by line:
URLholds the redirect address that passes the check and then forwards to the metadata service.methodis stillGET, so the server makes a plain read request.

The image shows the metadata coming back through the SSRF. The response contained the AWS metadata of the company's cloud. In other words, the chain of open redirect, then SSRF, then metadata endpoint gave him the cloud's own description of itself. He states that he then had access to the entire cloud.
He reported it, and the company fixed it in about four hours. He was paid 40,000 INR, roughly 551 USD, which he says was the highest the program pays.
Step 3: The same bug on the test servers
After the fix he was asked to verify it. He wondered whether the fix had also been applied to the company's staging servers. Staging is a copy of the website used for testing changes before they go live. It often runs the same code as production but is not always kept up to date with security fixes.
He went to virustotal.com, found the staging subdomains, and replaced the production domain names in the request with the staging ones. The same chain worked again. He sent a second report and received another 40,000 INR, about 550 USD.
This is a common lesson: a fix on the live site does not automatically cover every copy of the site.
Step 4: Downloading other partners' signatures
He signed up as a partner. The signup flow asks for a scanned signature, so he uploaded a fake image. Uploaded images are stored in Amazon's file storage service, S3, and served to the public through cdn.redacted.com. A CDN (Content Delivery Network) is a network of servers that serves files quickly to visitors; here it is simply the address where the images live.
He first tried to bypass the upload rules, meaning he tried to sneak a file past the checks the site applies when you upload. He found no way in. But when he looked at the address of his uploaded image, it looked like this:
Line by line:
http://cdn.redacted.comis the file server./partner/is a folder for partner files.821111is a number that identifies the partner./signature/signature.pngis a fixed folder and filename that every partner's signature uses.
So the address is entirely predictable: change the number and you get someone else's file. This is a form of IDOR, short for Insecure Direct Object Reference: the site uses a simple identifier to point at a file or record, and does not check whether the person asking is allowed to see it. The everyday comparison: a hotel where your room key is just the room number written on a card, and the door opens for anyone who says the number out loud.
He wrote a Python script to loop through numbers and try to download other users' signatures. The result is shown below.

The image shows signatures belonging to other users being downloaded. The company paid 15,000 INR, about 206 USD, for this report.
Step 5: Refunding from another merchant's account
The QR payment system lets offline shops accept wallet payments. A shopkeeper gets a QR code and sticks it on the wall. The researcher got the idea while shopping and finding himself short of cash, so he was forced to pay by QR.
When a phone scans a QR code, the app sends a request like this:
{"request":{"qrCodeId":"QR_DATA_ASHDGVA","scanCompletedTime":"1530007755497"}}
Line by line:
- The whole thing is a JSON object with one field,
request, whose value is another object. qrCodeIdis the identifier encoded in the QR code.QR_DATA_ASHDGVAis a placeholder for the real value.scanCompletedTimeis a timestamp, a number representing the moment the scan finished.
The response contained the merchant identifier:
{....."MERCAHNT_ID":"SECRET_CODE",...}
Line by line:
MERCAHNT_IDis the identifier of the shop that owns the QR code. The misspelling is in the original response.SECRET_CODEis a placeholder for the real value.
He signed up as a merchant, paid a small amount to his own merchant account by QR, and performed a genuine refund to see how the flow worked. Then he took the merchant id of a different merchant and used it in the refund request while keeping his own login. The refund went through from the other merchant's account.
The problem: the refund code trusted the merchant id supplied in the request and never checked that it belonged to the account making the call. That is a missing authorisation check on an object identifier, the same family of mistake as the signature images. The everyday comparison: a bank teller who processes a withdrawal from any account number you write on the slip, without checking that the slip is yours.
According to the report, this affected all offline merchant stores using the QR system across India, including IRCTC, India's e-ticketing website. He was paid 23,000 INR, about 317 USD.
Why each bug worked
The SSRF protection was a regex that only allowed *.redacted.com. It checked the host in the URL but not where that host would send the request next, so an open redirect turned the check into a formality. The metadata address [redacted] was reachable from the application server, and the response was handed back to the caller. The same chain worked against staging subdomains, so the production fix did not cover that environment.
The signature images were served from a predictable path built from a sequential numeric partner identifier and a fixed filename, and access to that path was not tied to the requesting account.
The refund flow trusted the merchant id supplied in the request without checking that it belonged to the session making the call.
What the impact was
Through the SSRF chain the researcher obtained the AWS metadata of the company's cloud and states that he then had access to the entire cloud. The same chain worked against staging. The signature issue let him download other partners' signature images. The refund issue let him issue refunds from another merchant's account, and the report says it affected offline merchant stores using the QR system across India, including IRCTC.
How it was fixed
The company fixed the SSRF within about four hours of the first report and asked him to verify it. The staging environment was still vulnerable when he retested, which suggests the fix had not been rolled out there.
Things to try yourself
- Put an allowed-domain URL that redirects elsewhere into any parameter the server fetches, and watch your own listener for the request. A positive result is an inbound request from the server to a host outside the allowlist.
- Point the same chain at
http://[redacted]/latest/meta-dataand look for metadata in the response. A positive result is instance metadata coming back in the body. - After a fix is confirmed on production, repeat the original request against staging and other non-production subdomains found through passive sources. A positive result is the same behaviour on an environment the fix missed.
- Take any asset URL with a numeric or otherwise guessable identifier and a fixed filename, and request it with another account's identifier. A positive result is another user's file being returned.
- In payment and refund flows, capture a request that carries a merchant or account identifier and substitute another identifier while keeping your own session. A positive result is a refund or state change on the other account.
Glossary
- API: a door into a server meant for programs rather than people, usually exchanging raw data instead of web pages.
- Authorisation: the check that a logged-in user is allowed to do a particular thing or see a particular record.
- Bug bounty program: an arrangement where a company pays researchers for finding and privately reporting security problems.
- CDN: a network of servers that delivers files quickly to visitors; here, the address where uploaded images are served.
- GET request: a request that asks a server to return something, without sending data in a body.
- IDOR: Insecure Direct Object Reference; a bug where a simple identifier in a request points at a record or file and the server does not check that the requester is allowed to see it.
- Instance metadata service: an internal address in a cloud, here
[redacted], that answers questions about the server itself, such as its account and permissions. - JSON: a text format for structured data, made of labelled fields and values.
- Open redirect: a page that forwards a visitor to any address supplied in a parameter, without checking that the destination is legitimate.
- POST request: a request that sends data in a body, usually to make the server do something.
- Private program: a bug bounty program open only to invited researchers.
- Python simple HTTP server: a tiny web server you can start on your own computer to watch for incoming connections.
- QR code: a square barcode scanned with a phone camera, here used to identify a shop for payment.
- Query string: the part of a web address after the
?, made of key and value pairs. - Regex: a pattern-matching rule used to check whether text has a particular shape.
- S3: Amazon's cloud file storage service.
- SSRF: Server-Side Request Forgery; a bug where an attacker makes the server fetch an address of the attacker's choosing.
- Staging: a copy of a website used for testing changes before they go live.
- Subdomain: a prefix on a domain name, such as
partnerinpartner.redacted.com. - Timestamp: a number representing a moment in time.
- VirusTotal: a public website that records information about files and domain names, useful for finding test servers.