Skip to content
Cache bugs Write-up Advanced

Forgot password? Taking over user accounts Kaminsky style

The article analyses 146 web applications and finds that some still have DNS resolvers vulnerable to Kaminsky or IP fragmentation attacks, which could allow an attacker to poison DNS cache and redirect password reset emails to take over user accounts.

Timo Longin Follow

Published on sec-consult.com

The "Forgot password?" feature and how DNS vulnerabilities may allow the takeover of user accounts.

Timo Longin (@timolongin), on sec-consult.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

Likely the web applications' DNS resolvers lacked sufficient source port randomness or accepted fragmented responses, and did not enforce DNS security features such as DNSSEC or DNS cookies.

Impact

An attacker who can poison the DNS cache could redirect password reset emails and take over user accounts; the article notes that only attack requirements were checked and that IP fragmentation attacks also require the ability to fragment DNS responses.

What the attacker needed

Attacker can poison DNS cache; victim uses forgot password feature; web app uses vulnerable DNS resolver

The fix

The DNS infrastructure should be secured by using large public DNS providers or following best practices for DNS resolvers, and the DNS Reset Checker can verify whether vulnerabilities remain.

How it was found

  1. Register a user on the target web application using an email address at a domain controlled by the tester.
  2. Observe the DNS queries sent by the web application to resolve the email domain.
  3. Use a DNS proxy to manipulate DNS responses and test for attack requirements such as IP fragmentation acceptance or source port randomness.
  4. If requirements are met, an attacker could perform DNS cache poisoning to redirect password reset emails.

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 use a 'forgot password' link, the website sends an email to your address. To do that, it looks up the address of your email provider using a system called DNS. If an attacker can trick that lookup, they can make the website send your reset email to their own server instead, and then use it to take over your account.

What is Cache bugs?

A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.

More by Timo Longin

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Web cache poisoning and deception

The lesson behind this report.

A cache and the origin disagree about a request, so a poisoned response is served to everyone or a private page is stored as public.