Skip to content
Open redirect Write-up Beginner

How a Trusted Header Turned Into an Open Redirect in Telekom’s System

The application trusted the client-supplied X-Forwarded-Host header when constructing redirect URLs, so an attacker could make the server issue a 302 redirect to an arbitrary domain. This enabled open redirects from a trusted Telekom domain, useful for phishing.

m0ro23 Follow

Published on medium.com

The app trusts the X-Forwarded-Host header blindly and uses it to build redirect URLs. If you swap that header for an attacker-controlled domain, the server happily redirects users there instead of staying on the real site.

m0ro23, on 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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The server took the host value directly from the client-controlled X-Forwarded-Host header and used it to build redirect URLs without checking it against trusted domains.

Impact

Users could be redirected from a trusted Telekom domain to an attacker-controlled page, which could support credential harvesting and could be chained with issues such as OAuth misconfigurations or password reset poisoning.

What the attacker needed

Ability to send a crafted HTTP request

The fix

The server should stop using X-Forwarded-Host to build redirect URLs and should enforce a whitelist of allowed domains, resolving redirects only to a trusted hardcoded domain.

How it was found

  1. Intercept a request to the target with a proxy.
  2. Add an X-Forwarded-Host header set to an attacker-controlled domain.
  3. Send the request.
  4. Observe a 302 response whose Location header points to the attacker domain.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A web server sometimes builds links using information the visitor's browser sends, such as the address it thinks it is visiting. Here the server believed a value the visitor could set freely, so an attacker could make the trusted site send people to their own fake page. That is dangerous because the link starts on a real company domain, which makes a phishing attempt look genuine.

What is Open redirect?

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

More by m0ro23

View all

1 more disclosed report, 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.