Skip to content
Misconfiguration Write-up Beginner

Paytm-Broken Link Hijacking

A social media link in Paytm's password reset email pointed to a Twitter account that did not exist, so an attacker could register that username and control where the link led. The attacker created a fake account with the same username, so users who clicked the link would be redirected to the attacker's profile.

Lohith Gowda M Follow

Published on lohigowda.medium.com

{{media:0}}

Lohith Gowda M, on lohigowda.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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 3 min read.

Context

Paytm is a payments platform with a normal login flow, including a forgot password feature that sends a password reset email to the user. That email is built from a template which, besides the reset link, contains links to Paytm's social media profiles. The write-up looks at those template links rather than at the reset token itself.

Broken Link Hijacking (BLH), as the author defines it, is a web-based attack where attackers take over expired, stale or invalid external links on credible websites or web applications for malicious purposes.

Setup

The researcher was hunting on the Paytm login functionality, initially looking for rate-limit and password token issues. No special accounts, tools or versions are described. The precondition for the finding is simply the ability to request a password reset email for a Paytm account and read the template on a mobile device.

Finding it

The rate-limit and password token hunt produced nothing. While checking email on a mobile, the author opened a forgot password email and, as usual, went through every link in the template, including the social media ones.

The template contained social media links, including Facebook and Twitter. The Facebook link redirected to Paytm's official Facebook page, with no issue. The second Twitter link was broken and redirected to an invalid Paytm blog page; that had no impact because the domain is owned by Paytm.

The third Twitter link was the interesting one: it redirected to the Twitter error page "This Account doesn't exist", meaning no user account existed with that username.

Password Reset Email Template From the original on lohigowda.medium.com

Password Reset Email Template

Broken Twitter Link From the original on lohigowda.medium.com

Broken Twitter Link

Exploitation

Step 1: Register the abandoned username

Immediately, the author created a fake Twitter account and changed its username to the username referenced by the broken link in the email template.

Username Updated From the original on lohigowda.medium.com

Username Updated

Step 2: Confirm the redirect

With the account in place, any Paytm user who requests a forgot password and clicks the Twitter link in the email template is redirected to the attacker-controlled account.

From the original on lohigowda.medium.com

No HTTP requests or responses are reproduced in the write-up; the evidence is the email template and the redirect behaviour shown in the screenshots.

Root cause

The email template points at a social media handle that no longer exists. The username was available, and the author registered a free Twitter account with it. The email template pointed at a Twitter username that no longer existed. The report does not describe any review or monitoring process that should have caught this.

Impact

Under the condition that a Paytm user requests a password reset and then clicks the Twitter link in the email, that user lands on an account controlled by the attacker. The link sits in a genuine Paytm password reset email, so users who click it land on the attacker's account. The report does not describe any further action taken from the fake account, and no data exposure or account takeover is claimed.

Fix

Paytm's security team fixed the issue, and the author re-tested and confirmed the fix.

Timeline

Date and time Event
Dec 24, 2021, 08:14 PM Reported to Paytm Security Team
Jan 03, 2022, 02:44 PM First response from Paytm Security Team
Jan 13, 2022, 06:47 PM Paytm Security Team fixed the issue
Jan 13, 2022, 07:24 PM Re-tested and confirmed the fix
Jan 19, 2022, 09:53 AM Awarded an Appreciation Certificate

Variants to test

  1. Enumerate every external link in transactional emails (password reset, welcome, receipt, notification) and check each social media handle. A positive result is a link that resolves to "This Account doesn't exist" or an equivalent vacant-profile page on a platform where registration is open.
  2. Check links to domains the organisation no longer owns, such as lapsed marketing domains or old blog hosts. A positive result is a link that resolves to a parked page, an expired-domain sale page or content unrelated to the organisation.
  3. Check documentation, help-centre pages and app store listings for the same stale handles. A positive result is a claimable handle referenced from a trusted property.
  4. After registering a candidate handle, verify the redirect from the original email or page end to end. A positive result is the trusted property sending users to the account you control.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 8 min read.

What happened, in plain words

Paytm is a payments platform with a normal login and a forgot password feature. It has a normal login and a forgot password feature. When you forget your password, Paytm sends you a password reset email.

That email is not written by hand each time. It is built from a template, a ready-made page with blanks filled in. Besides the reset link, the template also contains links to Paytm's social media profiles, such as Facebook and Twitter.

This write-up is about those social media links, not about the password reset link itself. One of the Twitter links in the email pointed at a Twitter username that no longer existed. The username was available, and the author registered a free Twitter account with it. The author did that, and any Paytm user who requests a password reset and clicks the Twitter link is redirected to that account.

This kind of problem is called Broken Link Hijacking (BLH). As the author defines it, it is a web-based attack where attackers take over expired, stale or invalid external links on credible websites or web applications for malicious purposes. A simple comparison: imagine a shop that prints its old phone number on every receipt. The shop changes number, but the receipts keep the old one. Eventually someone else is given that old number, and every customer who calls it reaches a stranger instead of the shop. The link in the email is the phone number, and the stranger is whoever registers the free username first.

Lohith Gowda M
Lohith Gowda M From the original on lohigowda.medium.com

Who wrote this and how the hunt started

The author introduces himself as Lohith, a senior security engineer and ethical hacker from Bengaluru. An ethical hacker is someone who looks for security weaknesses in systems, but only with permission, and reports them to the owner instead of misusing them.

He was testing Paytm's normal login functionality. A login flow is simply the sequence of screens and checks you go through to sign in. At first he was looking for two specific kinds of weakness:

  1. Rate-limit issues. A rate limit is a cap on how many times you may do something in a period, for example how many password reset emails you can request per hour. If there is no cap, someone can hammer the feature. He found nothing here.
  2. Password token issues. A token is a long random string that acts as a temporary key. In a password reset email, the reset link usually contains a token, so that only the person who received the email can use the link. If the token is guessable, reusable or leaks, the reset can be abused. He found nothing here either.

No special accounts, tools or software versions are described. The only precondition for the finding is being able to request a password reset email for a Paytm account and read that email on a phone.

Finding it

The rate-limit and password token hunt produced nothing. Later, while checking email on his mobile, the author opened a forgot password email. His habit, he says, is to go through every link in an email template, including the social media ones. This is a useful habit for a beginner to copy: an email is a page full of links, and each link is a door that leads somewhere. You want to know where each door goes.

The template contained social media links, including Facebook and Twitter. He opened them one by one.

  • The Facebook link went to Paytm's official Facebook page. No issue.
  • The second Twitter link was broken. It redirected to an invalid Paytm blog page. That had no impact, because the domain is owned by Paytm. A domain is the name of a site, like example.com; if Paytm owns the place the link lands on, a broken link there is only a cosmetic problem.
  • The third Twitter link was the interesting one. It redirected to Twitter's error page saying "This Account doesn't exist". That message means no user account exists with that username.
Password Reset Email Template From the original on lohigowda.medium.com

Password Reset Email Template

Broken Twitter Link From the original on lohigowda.medium.com

Broken Twitter Link

A redirect is when one address automatically sends your browser on to another address, like a receptionist pointing you to the right office. Here the email's link pointed at a Twitter profile address, and Twitter answered that the profile was empty.

Exploitation

Step 1: Register the abandoned username

Immediately, the author created a fake Twitter account and changed its username to the username referenced by the broken link in the email template. On Twitter, usernames are free and first come, first served. If the profile page says the account does not exist, the name is available, and anyone can claim it. That is the whole trick: the email still pointed at that name, but the name no longer belonged to Paytm.

Username Updated From the original on lohigowda.medium.com

Username Updated

Step 2: Confirm the redirect

With the account in place, any Paytm user who requests a forgot password and clicks the Twitter link in the email template is redirected to the attacker-controlled account. The email is genuine, sent by Paytm, so the customer has no reason to suspect the destination.

From the original on lohigowda.medium.com

No HTTP requests or responses are reproduced in the write-up. HTTP is the language browsers and servers use to talk to each other: the browser sends a request, the server sends back a response. The evidence here is the email template and the redirect behaviour shown in the screenshots, not captured network traffic.

Root cause

The email template points at a social media handle that no longer exists. A handle is just a username on a social platform. The email template pointed at a Twitter username that no longer existed. The report does not describe any review or monitoring process that should have caught this.

In everyday terms: the company moved office but never reprinted the letterhead, and the old address is now rented by someone else.

Impact

Under the condition that a Paytm user requests a password reset and then clicks the Twitter link in the email, that user lands on an account controlled by the attacker. The link sits in a genuine Paytm password reset email, so users who click it land on the attacker's account. Phishing is when an attacker pretends to be a trusted party to trick people into handing over information or money; impersonation is simply pretending to be someone you are not.

The report does not describe any further action taken from the fake account, and no data exposure or account takeover is claimed. In other words, the weakness is the redirect to an attacker-controlled profile, not proof that anyone was defrauded.

Fix

Paytm's security team fixed the issue, and the author re-tested and confirmed the fix. The natural correction is to update or remove the dead social media link in the password reset template so it no longer points at an unclaimed handle.

Timeline

Date and time Event
Dec 24, 2021, 08:14 PM Reported to Paytm Security Team
Jan 03, 2022, 02:44 PM First response from Paytm Security Team
Jan 13, 2022, 06:47 PM Paytm Security Team fixed the issue
Jan 13, 2022, 07:24 PM Re-tested and confirmed the fix
Jan 19, 2022, 09:53 AM Awarded an Appreciation Certificate

Variants to test

If you want to try this kind of check yourself, here are the same ideas written for a beginner. Each one is a place where a trusted page can point at something that no longer belongs to the organisation.

  1. Enumerate every external link in transactional emails (password reset, welcome, receipt, notification) and check each social media handle. Enumerate means to list them all, one by one. A positive result is a link that resolves to "This Account doesn't exist" or an equivalent vacant-profile page on a platform where registration is open.
  2. Check links to domains the organisation no longer owns, such as lapsed marketing domains or old blog hosts. A positive result is a link that resolves to a parked page, an expired-domain sale page or content unrelated to the organisation. A parked page is a placeholder page shown on a domain nobody is actively using.
  3. Check documentation, help-centre pages and app store listings for the same stale handles. A positive result is a claimable handle referenced from a trusted property.
  4. After registering a candidate handle, verify the redirect from the original email or page end to end. A positive result is the trusted property sending users to the account you control.

A word of caution for a beginner: the author registered the username to prove the point. Do not do it on a site that has not invited you, and never use the account to contact real customers.

Glossary

  • Paytm: a payments platform with login and a forgot password feature.
  • Forgot password: the feature that emails you a link to set a new password.
  • Email template: a ready-made email page with blanks filled in for each recipient.
  • Broken Link Hijacking (BLH): taking over expired, stale or invalid external links on credible sites for malicious purposes.
  • Ethical hacker: someone who looks for weaknesses with permission and reports them to the owner.
  • Login flow: the sequence of screens and checks used to sign in.
  • Rate limit: a cap on how many times an action may be performed in a period.
  • Token: a long random string used as a temporary key, for example inside a reset link.
  • Domain: the name of a site, such as example.com.
  • Redirect: when one address automatically sends your browser to another address.
  • Handle: a username on a social platform.
  • HTTP: the language browsers and servers use to exchange requests and responses.
  • Request and response: what the browser sends to a server, and what the server sends back.
  • Phishing: pretending to be a trusted party to trick people into giving away information or money.
  • Impersonation: pretending to be someone you are not.
  • Enumerate: to list items one by one.
  • Parked page: a placeholder page on a domain nobody is actively using.
  • Bug bounty programme: an arrangement where a company invites researchers to test its systems and report weaknesses.

More by Lohith Gowda M

View all

2 more disclosed reports, best first.

More from Paytm

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.