Skip to content
Open redirect Write-up Beginner

The Open Redirect Hunter’s Guide: How URL Path Manipulation Leads to Critical Security Risks

The author investigated whether directory traversal sequences in a URL path under /public/ could cause the application to redirect users to an external site. No redirect was confirmed; the text only describes the testing approach and potential impact.

Samadhan shimple Follow

Published on radiohackers.com

Open Redirect

Samadhan shimple, on radiohackers.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. 4 min read.

Context

This write-up describes an investigation into how a web application handled unusual URL paths, and whether its redirect logic could be manipulated to send users to an external site. The work was carried out during a web application security assessment against an authorised test environment, referred to in the request below by the placeholder host target.example. The feature under examination is an endpoint under the /public/ path, and the question was whether directory traversal sequences in that path could influence where the application redirects a user.

The author is careful about what this is and is not. No confirmed redirect to an external domain is shown, and no response from the application is reproduced. What follows is the reasoning and the test request used to probe the behaviour, together with the conditions that would have to hold before the behaviour could be called a vulnerability.

Setup

The report does not describe any accounts, roles, tooling or product versions. The only precondition it states is that testing was performed against an authorised environment, with target.example standing in for the real host. The request shown is illustrative of the test path rather than a capture from a live target.

Finding it

While assessing the application, the author looked at how it handled unusual URL paths and whether the redirect logic could be influenced by them. The focus was an endpoint under /public/. Directory traversal sequences such as ../ are normally associated with path traversal, where the goal is to reach files outside an intended directory. Here the interest was different: whether those sequences would change the destination of a redirect.

The behaviour looked worth investigating because path traversal and open redirect are distinct issues that can interact through URL normalisation. An application may normalise a path, reject the request, serve a resource, or issue a redirect. Only the last of these, to an unexpected destination, is the interesting case. The presence of ../ in a path proves nothing on its own.

Exploitation

Step 1: send a path containing traversal sequences

The author used the following request path to see how the endpoint handled a manipulated URL:

HTTP
GET /public/../../evil.com/../.. HTTP/1.1Host: target.example

The path starts under /public/, climbs out with ../../, names an external-looking host evil.com, and then climbs again with /../... The aim was to observe whether the application normalised the path, rejected it, served a resource, or generated a redirect to an unexpected destination. The report does not give the response to this request, so the outcome of the probe is not established in the text.

Step 2: confirm a redirect properly

To call the behaviour an open redirect, the author sets a clear bar: the application must actually return a redirect response, such as 302 Found, with a Location header pointing to an external domain under the tester's control. A status code on its own is not sufficient evidence. No such response is shown in the report.

Root cause

The report does not identify a specific defect in the application's code. The implied concern is that redirect logic might interpret manipulated path input as an external destination after normalisation, rather than validating the final interpreted destination. Whether that happened here is not stated. Any root cause in this application would be likely to sit in the interaction between path normalisation and redirect handling, but the report presents that as a hypothesis to test, not a confirmed finding.

Impact

If confirmed, an open redirect would let an attacker make phishing links look more credible, because the link would begin with a legitimate application domain before sending the user elsewhere. The author is explicit that this is potential impact, not demonstrated impact. An open redirect by itself does not show that credentials can be stolen, that malware will be delivered, or that the application has been compromised. The real impact depends on the application's behaviour, its redirect restrictions, and how the link could realistically be abused.

On classification, a confirmed open redirect maps to CWE-601: URL Redirection to Untrusted Site. Severity depends on circumstances: a basic open redirect without additional security impact may be rated Informational or Low by a bug bounty program, and a higher rating needs evidence of meaningful additional impact, such as demonstrated abuse of an authentication flow or another security boundary being bypassed. A CVSS score should only be assigned after the verified behaviour and attack conditions have been evaluated; the author notes that a score of 4.3 should not be treated as definitive without confirming that the chosen vector accurately represents the vulnerability.

Fix

The report sets out what developers should do rather than what was changed:

  1. Avoid accepting arbitrary redirect destinations.
  2. Where redirects are necessary, validate destinations against an explicit allowlist of permitted internal paths or trusted domains.
  3. Use reliable URL parsing and canonicalisation methods instead of simple string checks.
  4. Apply validation to the final interpreted destination, not just the original input.
  5. Handle unusual paths consistently, and reject invalid redirect requests rather than interpreting them as unexpected external destinations.

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. 12 min read.

What happened, in plain words

A security researcher spent some time testing a website to see how it behaved when it was given unusual web addresses. The specific question was simple: if you ask the site for a strange-looking page address, does it ever end up sending your browser somewhere else, to a website the site owner never intended?

That kind of behaviour, if it exists, is called an open redirect. It is worth understanding because it is one of the easiest security issues to misunderstand. A link that starts with a familiar, trusted website name can look completely safe to a normal person, and yet quietly bounce them to a scam site. The researcher's article is careful about this: it explains the idea, shows the one test request used, and then says plainly that no redirect to an outside site was actually confirmed. The article is about how to investigate the question properly, not about a proven break-in.

This beginner version walks through the same material in the same order: what was being tested, the single request that was sent, what would count as proof, what the impact could be, how such issues are classified, and how developers should fix them. Every technical term is explained the first time it appears.

This image is a AI Generated From the original on radiohackers.com

The image at the top of the article is described by the author as AI generated. It is a title illustration, not a screenshot of the application or of any test result.

The background: what was being tested and why

The everyday comparison

Think about a receptionist in a large office building. You ask for "the accounts department", and the receptionist points you down the corridor. That is a redirect: you asked for one thing, and the building told your feet to go somewhere else. Redirects are completely normal on the web. When you log in to a site, the site often sends you from the login page to your dashboard. When a page has moved, the site sends you to the new address. None of that is a security problem.

The problem starts when the receptionist will point you anywhere, including out of the building, based on instructions written on a scrap of paper that anyone could have handed over. If the receptionist only ever points to rooms inside the building, fine. If the receptionist can be talked into pointing at a fake office across the street that looks identical to the real one, that is an open redirect.

The terms you need first

  • A URL (Uniform Resource Locator) is the address you type into a browser, like https://example.com/public/page. It has parts: the scheme (https), the host (example.com), and the path (/public/page).
  • A path is the part after the host that says which page or resource you want. In /public/page, the path is /public/page.
  • An endpoint is a specific address on a server that does a specific job. You can think of it as a particular counter in the building: you go to that counter for that service.
  • A redirect is the server's way of telling your browser "not here, go there instead". It does this with a special response that carries a status code and a destination.
  • A status code is a three-digit number the server sends back to describe what happened. 200 means "here is your page". 302 Found means "the thing you asked for is temporarily somewhere else, go to the address I am giving you".
  • A Location header is the part of a redirect response that contains the destination address. It is the "go there" instruction.
  • A header is a small labelled piece of information sent alongside a web request or response, like the label on a parcel. Host: tells the server which website name you are asking for; Location: tells the browser where to go next.
  • Directory traversal (also called path traversal) means putting ../ sequences into a path. On a computer, .. means "go up one folder". So ../../ means "go up two folders". Attackers use this to try to reach files outside the folder they are supposed to be allowed into.
  • URL normalisation is the process of tidying up a URL into its standard form before using it. Just as a postal service might rewrite "Main St." as "Main Street", a server may collapse ../ sequences, remove duplicate slashes, or decode special characters before deciding what the address really means.
  • An open redirect is when a site will redirect a visitor to a destination that an outsider can choose, without checking that the destination is allowed.

The specific target

The researcher focused on an endpoint under the /public/ path. The /public/ prefix suggests a part of the site meant to be openly reachable, but the article does not describe what the endpoint does beyond handling redirects. The question was whether putting traversal sequences into that path could change where the application sends the user.

The article is explicit that this is an authorised test. The host name used in the request, target.example, is a placeholder standing in for the real test environment. example is a reserved name that can never belong to a real company, so it is safe to publish in an article.

Why this was worth looking at

Path traversal and open redirect are different problems. Path traversal is about reading files you should not be able to read. Open redirect is about sending people to a destination you should not be able to choose. But they can bump into each other through normalisation. A server that tidies up a path containing ../ might, depending on how its redirect logic is written, end up treating part of that path as an outside destination. That is the hypothesis. The article stresses that the presence of ../ in a path proves nothing by itself. The server might tidy the path, reject the request, serve a normal page, or redirect. Only the last of those, to an unexpected place, would be interesting.

The test request

The researcher sent one request to see how the endpoint reacted to a manipulated path:

HTTP
GET /public/../../evil.com/../.. HTTP/1.1Host: target.example

Line by line, in plain words:

  • GET is the method, the verb of the request. It means "please give me this thing". Browsers use it every time you load a page.
  • /public/../../evil.com/../.. is the path being requested. It starts inside the /public/ area, then uses ../../ to climb up two levels, then names evil.com, then climbs up twice more with /../... The name evil.com is a stand-in for an outside website; it is not a real destination that was contacted.
  • HTTP/1.1 says which version of the web protocol is being spoken.
  • Host: target.example is the header that tells the server which site name the request is for. One server can host many websites, so it needs to know which one you mean. target.example is the placeholder for the authorised test environment.

The purpose of this shape of path is to ask a question of the server: when you tidy this up, what do you decide it means? If the server collapses the ../ parts, the path may reduce to something harmless. If it does not, and if its redirect logic reads the evil.com part as a destination, it might send the browser to an outside site. The article does not reproduce the server's response, so the outcome of this probe is not established in the text. The request is shown as an illustration of the test path, not as a captured result.

What would count as proof

The researcher sets a clear bar before calling anything an open redirect. The application must actually return a redirect response, such as 302 Found, and the Location header in that response must point to an external domain under the tester's control. A status code on its own is not enough. A server could return a redirect to a perfectly legitimate internal page, and that would be normal behaviour, not a vulnerability. The proof is the combination: a redirect status plus a destination that leaves the site.

No such response is shown in the article. That is the honest position: the test was designed, the conditions for success were defined, and the result is not claimed.

Why the behaviour would matter

If it were confirmed, an open redirect would help an attacker make a phishing link look credible. Phishing is the practice of sending someone a link or message that pretends to be from a trusted source in order to trick them into handing over information or installing something harmful. A link that begins with a real, familiar website address looks far more trustworthy than a link to a strange domain. The victim clicks, the trusted site bounces them onward, and they land on a fake login page that copies the real one.

The article is careful to separate potential impact from demonstrated impact. An open redirect by itself does not prove that passwords can be stolen, that malware will be delivered, or that the application has been compromised. The real impact depends on how the application behaves, what restrictions it has on redirects, and how the link could realistically be used. This distinction matters: a security report that overstates its impact is less useful, not more.

How this kind of issue is classified

A confirmed open redirect maps to CWE-601: URL Redirection to Untrusted Site. CWE stands for Common Weakness Enumeration, a public catalogue of known categories of software weakness. Each entry has a number and a name, so different teams can refer to the same kind of problem unambiguously.

Severity is a separate question from classification. Severity is how serious the issue is judged to be. A basic open redirect with no additional security impact may be rated Informational or Low by a bug bounty program. A bug bounty program is a scheme where an organisation invites outside researchers to test its systems and pays for valid findings. A higher rating needs evidence of meaningful extra impact, such as demonstrated abuse of an authentication flow (the login process) or another security boundary being bypassed.

CVSS stands for Common Vulnerability Scoring System, a standard way of turning the characteristics of a vulnerability into a number from 0 to 10. The article says a CVSS score should only be assigned after the verified behaviour and attack conditions have been evaluated. It also notes that a score of 4.3 should not be treated as definitive without confirming that the chosen vector accurately represents the vulnerability. A vector here means the specific set of characteristics chosen to describe the issue; pick the wrong ones and the number is meaningless.

How developers should fix it

The article sets out guidance rather than describing a change that was made:

  1. Avoid accepting arbitrary redirect destinations. If the application does not need to send users to addresses supplied in the request, it should not.
  2. Where redirects are necessary, validate destinations against an explicit allowlist of permitted internal paths or trusted domains. An allowlist is a list of things that are allowed, and everything not on the list is refused. It is the opposite of a blocklist, which tries to name everything bad.
  3. Use reliable URL parsing and canonicalisation methods instead of simple string checks. Parsing means breaking a URL into its real parts so you can reason about them. Canonicalisation means reducing it to one standard form. Simple text matching can be fooled by small variations that mean the same thing to a browser.
  4. Apply validation to the final interpreted destination, not just the original input. What matters is where the browser will actually end up, after all the tidying and decoding.
  5. Handle unusual paths consistently, and reject invalid redirect requests rather than interpreting them as unexpected external destinations.

Lessons from the investigation

The article closes with a point that applies to every kind of security testing: unusual URL behaviour is a starting point for testing, not proof of a vulnerability. A convincing report needs reproducible evidence, a clear explanation of the root cause, and an impact statement that reflects what was actually demonstrated. Root cause means the underlying reason the behaviour happens, not just the symptom. Separating what you observed from what you assume makes a finding more useful to the developers and security teams who have to act on it.

Glossary

  • Allowlist: a list of things that are explicitly permitted; anything not on the list is refused.
  • Absolute URL: a full web address including the scheme and host, such as https://example.com/page.
  • Bug bounty program: a scheme where an organisation invites outside researchers to test its systems and pays for valid findings.
  • Canonicalisation: reducing a URL to one standard form so that different spellings of the same address can be compared reliably.
  • CWE: Common Weakness Enumeration, a public catalogue of categories of software weakness, each with a number and a name.
  • CWE-601: the catalogue entry for URL Redirection to Untrusted Site, the category a confirmed open redirect falls under.
  • CVSS: Common Vulnerability Scoring System, a standard method for turning a vulnerability's characteristics into a score from 0 to 10.
  • Directory traversal (path traversal): putting ../ sequences into a path to try to reach files or locations outside the intended folder.
  • Endpoint: a specific address on a server that performs a specific job.
  • GET: the HTTP method used to ask a server for a resource; the verb of a normal page request.
  • Header: a labelled piece of information sent with a web request or response, such as Host or Location.
  • Host: the part of a URL that names the website, such as example.com.
  • Location header: the part of a redirect response that gives the destination address.
  • Lookalike host: a domain spelled to resemble a trusted one, used to mislead.
  • Normalisation: tidying a URL into its standard form before it is used, for example collapsing ../ sequences.
  • Open redirect: a redirect to a destination an outsider can choose, without proper validation.
  • Parameter: a named value attached to a URL, usually after a ?, such as ?next=/dashboard.
  • Parsing: breaking a URL into its real component parts so they can be reasoned about.
  • Path: the part of a URL after the host that identifies the page or resource.
  • Percent encoding: writing special characters in a URL as a percent sign followed by two hexadecimal digits.
  • Phishing: tricking someone with a message or link that pretends to come from a trusted source.
  • Redirect: a server response telling the browser to go to a different address instead.
  • Root cause: the underlying reason a behaviour occurs, as opposed to its visible symptom.
  • Scheme-relative URL: an address starting with // that borrows the scheme of the current page.
  • Severity: how serious an issue is judged to be.
  • Status code: a three-digit number in a response describing what happened, such as 200 or 302 Found.
  • URL: Uniform Resource Locator, the address of a resource on the web.
  • Userinfo: the optional username part before an @ in a URL, which can be used to disguise the real host.
  • Vector: the specific set of characteristics chosen to describe a vulnerability when calculating a CVSS score.

More by Samadhan shimple

View all

7 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.