How does my recon win $250 in 15 minutes
An OAuth authorisation endpoint accepted a redirect_uri pointing to an external site, allowing an open redirect. An attacker could craft a link that sends users to an arbitrary domain after authorisation.
Published on medium.com
I’m Hein Thant Zin and just a noob bug hunter .Today, I’m going to share how recon helps me to find eazy bug in HackerOne ‘s Private program.
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
This is a short account of how a simple recon step turned into a paid open redirect on a private HackerOne program. The author, Hein Thant Zin (@H3Lowr), refers to the target only by a placeholder name, reacted.com, so the real hostnames are not disclosed here. The program had two in-scope domains:
http://app.reacted.com
http://api.reacted.com
The feature involved is a payment authorisation endpoint on the API host. It takes a scope, a client_id and a redirect_uri, and normally sends the user back to the application after authorisation. The redirect_uri is the parameter that decides where the browser goes next.
Setup
The author had just received his first bounty and was then invited to a private program. There were no special accounts, roles or tools described: the work was manual testing plus reading the program's public GitHub repositories. The precondition that mattered was simply that the API host was in scope and that its source or configuration was visible in a repository.
Finding it
The first pass was on the main application domain, testing common issues such as CSRF, XSS and logic bugs. Nothing came of it, which the author puts down to the application having already been tested by more experienced hunters.
The next day he did recon instead, going through the organisation's GitHub repositories. There he found a payment API endpoint:
The redirect_uri parameter stood out: a value that controls where the browser is sent after authorisation is exactly where an open redirect lives, and a redirect on an API host can be reached by anyone who can craft a link.
Exploitation
Step 1: point the redirect somewhere else
He replaced https://app.reacted.com with an external site:
This did not work. The server answered with a 400 Bad Request, so a naive swap of the host was rejected.
Step 2: bypass the check
The rejection suggested some validation on the value. He tried variations and one of them was accepted and redirected the browser to the external site:

The report places a screenshot here, without describing it. The report does not say which variation was accepted.
Step 3: check for more and report
He also tested the endpoint for SSRF and XSS, and both failed. He reported the open redirect and the program paid $250. The whole thing took about 15 minutes, in contrast with four or five hours spent on the main application the night before with nothing to show for it.
Root cause
The plain external URL returned a 400, but a variation was accepted and redirected off-site. In other words the check is not strict enough: it accepts a crafted form of the parameter that the browser then follows off-site. The report does not include the server-side code, so the exact comparison being bypassed is not shown; . The plain external URL returned a 400; a variation was accepted.
Impact
An attacker can craft a link on the trusted api.reacted.com host that, after the authorisation flow, sends the victim to a site of the attacker's choosing. The report does not describe any concrete phishing or token-theft scenario, and the author notes that SSRF and XSS attempts on the same endpoint failed, so the impact demonstrated is the redirect itself.
Fix
The fix should be to validate redirect_uri against an exact allow-list of registered callback URLs rather than a pattern that a crafted value can satisfy, and to reject anything that does not match exactly before issuing the redirect.
Variants to test
- Other OAuth-style endpoints. Look for
redirect_uri,return_url,callback,nextorcontinueparameters on login, payment and SSO endpoints. A positive result is a302whoseLocationheader points to a host you control. - Same parameter, different encodings. Try the value with different schemes, casing, trailing characters, userinfo, encoded characters and path tricks. A positive result is any variant that returns a redirect instead of the
400seen on the plain external URL. - Repository recon. Search the organisation's public repositories for endpoint paths and parameter names, as was done here. A positive result is an in-scope endpoint you had not seen in the running application.
- Chained checks. On any endpoint that accepts a URL, also test for SSRF and XSS, as the author did. A positive result there would raise the severity well beyond a plain redirect.
Takeaway
The lesson the author draws is about approach: do not skip recon steps, because more recon means more chances of a payout. A short, focused look at the source repositories found in 15 minutes what hours on the main application did not.

What happened, in plain words
A bug hunter found a way to make a company's own website send visitors to any other website the attacker chose. This kind of flaw is called an open redirect. He found it not by poking at the main website for hours, but by reading the company's public code repositories on GitHub, a step called recon (short for reconnaissance, meaning gathering information about a target before attacking it). The company paid him $250 for the report, and the whole thing took about 15 minutes. The night before, he had spent four or five hours testing the main application and found nothing.
The target is referred to only by a placeholder name, reacted.com, so the real hostnames are not disclosed. The program was a private one on HackerOne, a bug bounty platform where companies invite researchers to test their systems and pay for valid findings. Only two domains were in scope:
http://app.reacted.com
http://api.reacted.com
In scope means the company has authorised testing on those addresses; testing anything else would be out of bounds. app.reacted.com is the main application, the part a normal user sees. api.reacted.com is an API host. An API (Application Programming Interface) is the behind-the-scenes part of a service that other software talks to: it accepts requests and returns data or actions, rather than showing a full web page. Think of a restaurant: the dining room is the app, and the kitchen door where waiters pass orders is the API.
The feature involved is a payment authorisation endpoint on the API host. An endpoint is a specific address (URL) that accepts a particular kind of request. This one takes three pieces of information, called parameters (the name=value pairs after the ? in a URL):
scope, here set topayments, which says what kind of permission is being requested.client_id, here12345, which identifies which application is asking.redirect_uri, which tells the service where to send the user's browser after the authorisation step finishes.
The redirect_uri is the parameter that decides where the browser goes next. That is exactly the kind of control an open redirect abuses: if the service trusts whatever address you put there, an attacker can put their own site and the trusted service will forward victims to it.
Setup
The author had just received his first bounty and was then invited to a private program. There were no special accounts, roles or tools described: the work was manual testing plus reading the program's public GitHub repositories. GitHub is a website where developers store and share code; public repositories can be read by anyone. The precondition that mattered was simply that the API host was in scope and that its source or configuration was visible in a repository.
Finding it
The first pass was on the main application domain, testing common issues such as CSRF, XSS and logic bugs. CSRF (Cross-Site Request Forgery) is when a malicious site tricks a logged-in user's browser into sending a request the user did not intend. XSS (Cross-Site Scripting) is when an attacker gets their own code to run inside someone else's web page. Logic bugs are flaws in how a feature is supposed to work, rather than in low-level code. Nothing came of it, which the author puts down to the application having already been tested by more experienced hunters.
The next day he did recon instead, going through the organisation's GitHub repositories. There he found a payment API endpoint:
Line by line:
https://api.reacted.com/authorizeis the address of the endpoint.httpsis the secure version of the web protocol;api.reacted.comis the API host;/authorizeis the path that names the feature.?starts the list of parameters.scope=paymentsasks for payment-related permission.&separates parameters.client_id=12345identifies the requesting application.redirect_uri=https://app.reacted.comsays: after authorisation, send the browser back to the main app.
The redirect_uri parameter stood out: a value that controls where the browser is sent after authorisation is exactly where an open redirect lives, and a redirect on an API host can be reached by anyone who can craft a link.
Exploitation
Step 1: point the redirect somewhere else
He replaced https://app.reacted.com with an external site:
Line by line:
- The endpoint and the first two parameters are unchanged.
redirect_uri=https://google.comnow points to an outside site instead of the company's own app.
This did not work. The server answered with a 400 Bad Request, so a naive swap of the host was rejected. A 400 is an HTTP status code meaning the server refused the request as invalid. In plain terms, the service checked the address and said no.
Step 2: bypass the check
The rejection suggested some validation on the value. Validation means the server inspects the input and decides whether to accept it. He tried variations and one of them was accepted and redirected the browser to the external site:

The report places a screenshot here, without describing it. The report does not say which variation was accepted.
Step 3: check for more and report
He also tested the endpoint for SSRF and XSS, and both failed. SSRF (Server-Side Request Forgery) is when an attacker makes the server itself fetch a URL, often to reach internal systems. He reported the open redirect and the program paid $250. The whole thing took about 15 minutes, in contrast with four or five hours spent on the main application the night before with nothing to show for it.
Root cause
The plain external URL returned a 400, but a variation was accepted and redirected off-site. In other words the check is not strict enough: it accepts a crafted form of the parameter that the browser then follows off-site. The report does not include the server-side code, so the exact comparison being bypassed is not shown; . The plain external URL returned a 400; a variation was accepted.
Impact
An attacker can craft a link on the trusted api.reacted.com host that, after the authorisation flow, sends the victim to a site of the attacker's choosing. The report does not describe any concrete phishing or token-theft scenario, and the author notes that SSRF and XSS attempts on the same endpoint failed, so the impact demonstrated is the redirect itself.
Fix
The fix should be to validate redirect_uri against an exact allow-list of registered callback URLs rather than a pattern that a crafted value can satisfy, and to reject anything that does not match exactly before issuing the redirect. An allow-list is a list of values that are explicitly permitted; anything not on the list is refused.
Variants to test
- Other OAuth-style endpoints. Look for
redirect_uri,return_url,callback,nextorcontinueparameters on login, payment and SSO endpoints. A positive result is a302whoseLocationheader points to a host you control. A 302 is an HTTP status code meaning a redirect; theLocationheader is where the browser is told to go next. SSO (Single Sign-On) is a login system that lets one account sign in to several services. - Same parameter, different encodings. Try the value with different schemes, casing, trailing characters, userinfo, encoded characters and path tricks. A positive result is any variant that returns a redirect instead of the
400seen on the plain external URL. Encoding means representing characters in a special form (for example%2Ffor/) so they survive transport; userinfo is the optionaluser:password@part before a hostname in a URL. - Repository recon. Search the organisation's public repositories for endpoint paths and parameter names, as was done here. A positive result is an in-scope endpoint you had not seen in the running application.
- Chained checks. On any endpoint that accepts a URL, also test for SSRF and XSS, as the author did. A positive result there would raise the severity well beyond a plain redirect.
Takeaway
The lesson the author draws is about approach: do not skip recon steps, because more recon means more chances of a payout. A short, focused look at the source repositories found in 15 minutes what hours on the main application did not.

Glossary
- API: the behind-the-scenes part of a service that other software talks to, accepting requests and returning data or actions.
- Endpoint: a specific URL that accepts a particular kind of request.
- Parameter: a
name=valuepair in a URL that passes information to the server. - Open redirect: a flaw where a trusted site can be made to send visitors to any address an attacker chooses.
- Recon: short for reconnaissance; gathering information about a target before testing it.
- Bug bounty: a programme where companies pay researchers for reporting valid security flaws.
- HackerOne: a bug bounty platform where companies invite researchers to test their systems.
- In scope: authorised for testing; anything else is out of bounds.
- CSRF: Cross-Site Request Forgery; a malicious site tricks a logged-in user's browser into sending an unintended request.
- XSS: Cross-Site Scripting; an attacker gets their own code to run inside someone else's web page.
- Logic bug: a flaw in how a feature is supposed to work, rather than in low-level code.
- SSRF: Server-Side Request Forgery; an attacker makes the server itself fetch a URL, often to reach internal systems.
- Validation: the server inspects input and decides whether to accept it.
- 400 Bad Request: an HTTP status code meaning the server refused the request as invalid.
- 302: an HTTP status code meaning a redirect; the
Locationheader says where to go next. - Location header: the part of a redirect response that tells the browser the next address.
- Allow-list: a list of values that are explicitly permitted; anything not on the list is refused.
- Encoding: representing characters in a special form (for example
%2Ffor/) so they survive transport. - Userinfo: the optional
user:password@part before a hostname in a URL. - SSO: Single Sign-On; a login system that lets one account sign in to several services.
- GitHub: a website where developers store and share code; public repositories can be read by anyone.