Skip to content
Account takeover Write-up Intermediate

Red Hat SSO 7.6 Host Header Injection Vulnerability

Red Hat SSO 7.6 builds password reset URLs from the HTTP Host header, so an attacker can change that header to their own server and receive the reset token when the victim clicks the emailed link. The attacker could then use the token to reset the victim's password and take over the account.

mark.roy.1337 Follow

Published on medium.com

I reported this vulnerability to Red Hat several months ago, outlining its potential impact. While my report was not accepted, this issue posed a high-risk security concern for one of our clients, who was unaware of the vulnerability.

Mark Roy, 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 application constructs the password reset URL using UriBuilder with context.getUriInfo(), which includes the attacker-controlled Host header from the incoming request.

Impact

An attacker could intercept password reset tokens and gain control over the victim's account, though the report notes Red Hat did not accept the vulnerability.

What the attacker needed

Victim has an account; victim clicks the emailed reset link; attacker can send requests with a modified Host header

The fix

The root cause is in the application code; as a temporary mitigation, a JBoss Undertow expression-filter can be added to standalone.xml to reject requests whose Host header does not match an expected value, returning a 403.

How it was found

  1. Send a password reset request with the Host header changed to a Burp Collaborator address.
  2. The victim receives an email containing the modified URL.
  3. The victim clicks the link, and the reset key is logged on the attacker's server.
  4. The attacker uses the key to reset the victim's password.

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.

When you ask a website to reset your password, it sends you an email with a special link. This application built that link using a value (the Host header) that the person making the request can change. By changing it to their own server, an attacker makes the email point to their site, so when you click the link the secret reset code is sent to them instead of the real site.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.