Skip to content
Open redirect Write-up Intermediate

Security Implications of URL Parsing Differentials

An open redirect vulnerability in mod_auth_openidc arose because Apache's URL parser and web browsers interpret backslashes in URLs differently, allowing an attacker to craft a URL that passes validation but redirects to an unintended host. This could be abused for advanced phishing attacks.

During our security research on an authentication module for Apache2, we identified an issue introduced by how the HTTP server Apache2 and modern web browsers parse URLs differently. Although the general problem of differential URL parsing has been documented publicly, we think it did not get the attention it deserved.

Security Implications of URL Parsing Differentials, on blog.sonarsource.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

Impact

An attacker could perform advanced phishing attacks by redirecting users to a malicious site while the URL appears to belong to the trusted domain.

What the attacker needed

Mod_auth_openidc deployed; victim clicks a crafted link

The fix

The maintainers added a special case to replace any backslash with slashes, effectively preventing the parsing differential.

How it was found

  1. Deploy mod_auth_openidc as an OpenID Connect Relying Party.
  2. Craft a URL with a backslash before the @ symbol, such as https://evil.destination.tld\@host.tld/.
  3. Send the crafted URL as the logout parameter to an endpoint like /oauth2/callback.
  4. The validation passes because apr_uri_parse() interprets the host as host.tld, but the browser redirects to evil.destination.tld.

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 a web server checks a URL to decide if it is safe to redirect a user to, it uses a URL parser. Browsers use a different parser. If the two parsers disagree about which part of the URL is the host, an attacker can craft a URL that looks safe to the server but sends the user to a malicious site. This is called a parsing differential.

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.

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.