Skip to content
Open redirect Disclosed report Beginner

Link poisoning on https://secure.login.gov/ login page

The login.gov page accepted a host parameter that redirected users to an external site when they changed the language. An attacker could use this to send users to a phishing page that impersonates login.gov.

James Kettle Follow

Originally disclosed on HackerOne

Bounty$150 Low 3.1 View original
  • Triaged in under an hour
  • Fixed in 6 months
  • Paid in 46 days
  • Disclosed after 15 months

This link leads to the genuine secure.login.gov login page, in French: https://secure.login.gov/fr?host=portswigger.net

However, if you try to change the language to English using the bar at the bottom you'll end up an external website of my choice. As users won't expect changing their language to place them on an external website, the attacker could launch a highly effective phishing attack from there by impersonating secure.login.gov

Impact

This vulnerability makes it possible to launch phishing attacks originating from secure.login.gov

The original report as published on HackerOne, by albinowax. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 5 min read.

What the report shows

The target is the login page at https://secure.login.gov/, the authentication front end for a US government identity service. The feature in question is the language switcher: the page can be served in several languages, and the selected language is carried in the URL. The researcher, albinowax, submitted the finding to the GSA Bounty programme on HackerOne, where it was classified as an Open Redirect with a low severity and a CVSS score of 3.1. The report was disclosed on 25 March 2019 and paid a bounty of 150.00 USD.

The starting point is a URL that loads the genuine login page in French:

Text
https://secure.login.gov/fr?host=portswigger.net

This link resolves to the real secure.login.gov login page, so a victim following it sees nothing unusual. The host parameter is present in the URL but does not change where the French page is served from.

The behaviour changes when the visitor uses the language bar at the bottom of the page to switch to English. Instead of reloading the same login page in English, the browser is sent to an external website chosen by whoever supplied the link. The external site is chosen by whoever supplies the link; in the example the host value is portswigger.net.

The report does not include the exact request or response that performs the redirect, and it does not describe the server-side code involved. What it does establish is the sequence: a crafted link with a host parameter, a genuine page on first load, and a redirect off-site once the language is changed through the on-page control.

Root cause

The report does not describe the cause; the host parameter appears to influence where the language change sends the browser.

Impact

The report frames the impact as phishing. Because the first hop is a genuine secure.login.gov page, a victim has no reason to be suspicious, and changing the language is an ordinary action that users do not expect to move them to another site. The attacker can therefore place the victim on an external page that impersonates secure.login.gov, for example a fake login form that harvests credentials. The researcher describes this as a highly effective phishing attack for that reason.

The report does not claim any other impact, such as script execution or access to account data.

How this kind of bug works

An open redirect is a case where an application takes a destination from user-controlled input and sends the browser there without checking that the destination belongs to the application. The input can arrive as a query parameter, a path segment, a form field, a header such as Referer, or a value stored earlier and read back later.

Redirects are everywhere in web applications: after login, after logout, after a language or locale change, after a consent step, in shortened links, in email confirmation flows and in error handlers. Each of these is a place where a destination is chosen, and each is a candidate for the bug. The danger is not the redirect itself but the trust it borrows: a link on the legitimate domain lends credibility to whatever it forwards to.

Defences fall into two groups. The first is to avoid taking the destination from the request at all, using a fixed path or a server-side mapping from an identifier to a known URL. The second, when a destination must be supplied, is to validate it strictly: allow only relative paths, or compare the parsed host against an allowlist, and reject anything that does not match. Parsing the value properly matters, because naive prefix or substring checks can be bypassed with tricks such as userinfo syntax, backslashes, encoded characters or protocol-relative URLs.

How to test for it

  1. Map every place the application sends a redirect: login and logout, locale and language switching, password reset, email verification, OAuth and SSO callbacks, error pages and any link that carries a next, return, redirect, url, host, callback or similar parameter.
  2. For each candidate, replace the value with an external host you control and observe where the browser goes. Start with a plain absolute URL, then try protocol-relative form, a value with userinfo, and encoded variants.
  3. Watch the actual Location header and the final address bar, not just the rendered page. A positive result is a response that sends the browser to your host, or a page whose own controls (such as a language selector) navigate to your host.
  4. Test the multi-step cases: a parameter that appears inert on first load may be consumed by a later action, as in this report. Trigger the follow-up action and check the destination again.
  5. Confirm exploitability from a victim's perspective: the crafted link should start on the legitimate domain and end on yours without any warning.

Common false positives include redirects that only accept relative paths and normalise your input back to the same site, values that are reflected into the page but never used for navigation, and redirects that require an authenticated session or a valid token you cannot obtain. A redirect to a sibling subdomain that the program owns may also be considered out of scope, so check the programme's rules before reporting.

How it is fixed

  • Do not accept a destination from the request. Build redirect targets from a fixed table or from an opaque identifier resolved on the server.
  • If a destination must be accepted, allow only relative paths beginning with a single slash, and reject anything containing a scheme, a host or a backslash.
  • Where absolute URLs are genuinely needed, parse the value and compare the host against a strict allowlist, rejecting values that fail parsing or contain unexpected components.
  • Apply the same validation to values that are stored and later used for navigation, not just to values read directly from the current request.
  • Consider showing an interstitial warning page when leaving the site, so users see the destination before they arrive.

Hunting notes

Open redirects cluster around authentication and localisation. Language and locale switchers, region selectors, mobile-to-desktop handoffs, and marketing or campaign parameters are frequent offenders because developers treat them as presentation details rather than security boundaries. Login, logout and SSO flows are the classic locations, especially where a return or next value survives the round trip.

Recon signals worth following: parameters whose names suggest a destination, parameters that appear in the URL but seem to have no visible effect on the page, and any control that navigates the browser rather than updating content in place. Comparing behaviour across locales often reveals parameters that are only consumed in some language paths.

To make the report land, show the full chain from the trusted domain to your controlled host, include the exact URL and the step that triggers the navigation, and explain the realistic attack: a phishing page that mimics the original login form. Keep the demonstration on a domain you control and avoid interacting with real user accounts. If the programme treats open redirects as low impact, a clear phishing narrative and a reproducible chain are what make the case for triage.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

The target is the login page at https://secure.login.gov/, the front door for a US government identity service. Like many large websites, it can be shown in several languages, and the chosen language is carried in the web address (the URL). The researcher, albinowax, reported the issue to the GSA Bounty programme on HackerOne. It was classified as an Open Redirect, rated low severity with a CVSS score of 3.1, disclosed on 25 March 2019, and paid a bounty of 150.00 USD.

The starting point is a link that loads the genuine login page in French:

Text
https://secure.login.gov/fr?host=portswigger.net

Reading it piece by piece:

  • https://secure.login.gov/ is the real site. A victim who clicks the link lands on the real login page, so nothing looks wrong.
  • /fr tells the site to show the page in French.
  • ?host=portswigger.net is a parameter, an extra piece of information attached to the address. Here its value is portswigger.net, an external website. On the first load this value does nothing visible: the French page is served normally from secure.login.gov.

The behaviour changes when the visitor uses the language bar at the bottom of the page to switch to English. Instead of reloading the same login page in English, the browser is sent to an external website chosen by whoever supplied the link. The report does not include the exact request or response that performs the redirect, nor the server-side code behind it. What it does establish is the sequence: a crafted link with a host parameter, a genuine page on first load, and a redirect off-site once the language is changed through the on-page control.

Why does this matter? Users do not expect changing their language to move them to a different website. Because the first step is a real secure.login.gov page, the victim has no reason to be suspicious. The attacker can therefore place the victim on an external page that impersonates secure.login.gov. The researcher describes this as a highly effective phishing attack for that reason. The report does not claim any other impact, such as running code in the victim's browser or reaching account data.

In general, how this kind of bug works

An open redirect is a case where an application takes a destination from input the user can control and sends the browser there without checking that the destination belongs to the application. Think of a receptionist who will forward your call to any number a caller writes on a note, without checking whether that number belongs to the company.

The input can arrive as a query parameter (the ?name=value part of a URL), a path segment, a form field, a header such as Referer, or a value stored earlier and read back later.

Redirects are everywhere in web applications: after login, after logout, after a language or locale change, after a consent step, in shortened links, in email confirmation flows and in error handlers. Each of these is a place where a destination is chosen, and each is a candidate for the bug. The danger is not the redirect itself but the trust it borrows: a link on the legitimate domain lends credibility to whatever it forwards to.

Defences fall into two groups. The first is to avoid taking the destination from the request at all, using a fixed path or a server-side mapping from an identifier to a known URL. The second, when a destination must be supplied, is to validate it strictly: allow only relative paths, or compare the parsed host against an allowlist, and reject anything that does not match. Parsing the value properly matters, because naive prefix or substring checks can be bypassed with tricks such as userinfo syntax, backslashes, encoded characters or protocol-relative URLs.

How to test for it

  1. Map every place the application sends a redirect: login and logout, locale and language switching, password reset, email verification, OAuth and SSO callbacks, error pages and any link that carries a next, return, redirect, url, host, callback or similar parameter.
  2. For each candidate, replace the value with an external host you control and observe where the browser goes. Start with a plain absolute URL, then try protocol-relative form, a value with userinfo, and encoded variants.
  3. Watch the actual Location header and the final address bar, not just the rendered page. A positive result is a response that sends the browser to your host, or a page whose own controls (such as a language selector) navigate to your host.
  4. Test the multi-step cases: a parameter that appears inert on first load may be consumed by a later action, as in this report. Trigger the follow-up action and check the destination again.
  5. Confirm exploitability from a victim's perspective: the crafted link should start on the legitimate domain and end on yours without any warning.

Common false positives include redirects that only accept relative paths and normalise your input back to the same site, values that are reflected into the page but never used for navigation, and redirects that require an authenticated session or a valid token you cannot obtain. A redirect to a sibling subdomain that the programme owns may also be considered out of scope, so check the programme's rules before reporting.

How it is fixed

  • Do not accept a destination from the request. Build redirect targets from a fixed table or from an opaque identifier resolved on the server.
  • If a destination must be accepted, allow only relative paths beginning with a single slash, and reject anything containing a scheme, a host or a backslash.
  • Where absolute URLs are genuinely needed, parse the value and compare the host against a strict allowlist, rejecting values that fail parsing or contain unexpected components.
  • Apply the same validation to values that are stored and later used for navigation, not just to values read directly from the current request.
  • Consider showing an interstitial warning page when leaving the site, so users see the destination before they arrive.

Hunting notes

Open redirects cluster around authentication and localisation. Language and locale switchers, region selectors, mobile-to-desktop handoffs, and marketing or campaign parameters are frequent offenders because developers treat them as presentation details rather than security boundaries. Login, logout and SSO flows are the classic locations, especially where a return or next value survives the round trip.

Recon signals worth following: parameters whose names suggest a destination, parameters that appear in the URL but seem to have no visible effect on the page, and any control that navigates the browser rather than updating content in place. Comparing behaviour across locales often reveals parameters that are only consumed in some language paths.

To make the report land, show the full chain from the trusted domain to your controlled host, include the exact URL and the step that triggers the navigation, and explain the realistic attack: a phishing page that mimics the original login form. Keep the demonstration on a domain you control and avoid interacting with real user accounts. If the programme treats open redirects as low impact, a clear phishing narrative and a reproducible chain are what make the case for triage.

Glossary

  • Open redirect: a flaw where an application sends the browser to a destination supplied by the user without checking that the destination belongs to the application.
  • URL: the address of a page on the web, made of a scheme, a host, a path and optional parameters.
  • Parameter: an extra name=value pair attached to a URL after a ?, used to pass information to the site.
  • Host: the domain name part of a URL, such as secure.login.gov, which identifies the server being contacted.
  • Query parameter: another name for a parameter in the URL.
  • Redirect: a response from a server that tells the browser to load a different address instead.
  • Location header: the part of a redirect response that carries the address the browser should go to next.
  • Phishing: tricking someone into entering sensitive information, such as a password, on a fake page that imitates a real one.
  • Locale: the language and regional settings a site uses to display content, such as French or English.
  • Allowlist: a list of values that are explicitly permitted, with everything else rejected.
  • Relative path: a link that stays on the same site, such as /login, rather than naming another domain.
  • Protocol-relative URL: a link beginning with // that borrows the current page's scheme and points at another host.
  • Userinfo syntax: a way of writing a URL with a username before the host, which can be abused to disguise the real destination.
  • CVSS: a standard scoring system for rating the severity of a security flaw.
  • Severity: a label such as low, medium or high describing how serious a flaw is.
  • Bounty: a payment made to a researcher for reporting a valid security issue.
  • Disclosure: the point at which a reported issue is made public.
  • OAuth / SSO: login mechanisms that let a site hand authentication to another service and then send the user back.
  • Interstitial page: a warning page shown between two steps, for example before leaving a site.

More by James Kettle

View all

18 more disclosed reports, best first.

More from GSA Bounty

View all

The newest disclosed reports for this program.

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.