Skip to content
Business logic Disclosed report Beginner

Following a User Actually Follows Another User

A web intent page for following a user could be crafted so that it displays one account but actually follows a different account when the victim clicks follow. An attacker could use this to trick users into following them, for example for spam or social engineering.

ericr Follow

Originally disclosed on HackerOne

Bounty$280 View original
  • Triaged in 22 hours
  • Fixed in 11 days
  • Paid in 8 days
  • Disclosed after 41 days

I can display a web intent page to a victim that appears to prompt them to follow one user, but actually ends up following a completely different user when they click "follow". The following is a proof of concept:

https://twitter.com/intent/follow?screen_name=twitter&screen_name=ericrtest3&user_id=113483807

This is somewhat related to the last bug I submitted (see #95217), albeit the impact is more dramatic. This can be used by malicious users such as spammers and social engineers to trick a user into following them.

The original report as published on HackerOne, by ericr. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The target is the Twitter web intent flow, specifically the follow intent at twitter.com/intent/follow. The researcher found that the page could be made to display one account as the follow target while the click actually followed a different account.

The proof of concept is a single URL:

HTTP
https://twitter.com/intent/follow?screen_name=twitter&screen_name=ericrtest3&user_id=113483807

The URL carries two screen_name parameters and one user_id. The page appears to prompt the victim to follow one user, but when the victim clicks "follow", a completely different user is followed. The researcher describes the impact as more dramatic than a previous submission, referenced as #95217, and notes the trick can be used by spammers and social engineers to get a victim to follow them.

No severity rating or CVSS score is given, and the report does not describe a fix.

Root cause

The report does not explain the mechanism, but the shape of the URL points to it.

Impact

The victim sees a follow prompt for an account they may recognise or trust, and their click follows the attacker's account instead. The report says spammers and social engineers can use this to trick a user into following them.

How this kind of bug works

Intent and share endpoints are thin wrappers around an action: they render a confirmation page from request parameters, then submit the action with those same parameters. The bug class appears when the two steps disagree about which parameter is authoritative.

Common causes:

  1. Duplicate parameters. The server takes the first occurrence when rendering and the last when acting, or the reverse. The browser and the server may also disagree on ordering.
  2. Mixed identifiers. A human readable name and a numeric identifier are both accepted, and one is used for display while the other is used for the action.
  3. Client side rendering. The page is built in JavaScript from the query string, while the form posts a hidden field populated by different logic.
  4. Redirects after the action. The endpoint forwards the user to a URL taken from the request.

The result is a page whose visible content does not match the effect of the click. Defences are straightforward: resolve the target once, server side, from a single canonical parameter, and use that resolved value for both the display and the action. Reject requests with conflicting or duplicated target parameters rather than guessing.

How to test for it

Look for endpoints that render a confirmation or preview and then perform an action: follow, like, subscribe, add to list, share, invite, authorise an application. They usually take a target identifier in the query string.

  1. Send the normal request with one target parameter and confirm the page shows that target and the action applies to it.
  2. Send the request with the target parameter duplicated, with different values. Note which value the page displays.
  3. Complete the action and observe which target actually changed. A positive result is a mismatch between the displayed target and the applied target.
  4. Repeat with mixed identifier types, for example a name parameter plus a numeric identifier, and with parameters the page does not visibly use.
  5. Check the response after the action for a redirect taken from the request, and test whether that redirect can be pointed at another host.

A positive result is concrete: the page names one account and the action lands on another, or the endpoint forwards to an attacker controlled destination. Common false positives are caching, where a stale page shows an old target, and cases where the second parameter is ignored entirely, so display and action still agree. Confirm the mismatch with a fresh session and a clean request before reporting.

How it is fixed

  1. Accept a single canonical target parameter and ignore or reject duplicates.
  2. Resolve the target server side before rendering, and pass the resolved identifier into the action so display and effect cannot diverge.
  3. Validate that any identifier in the request maps to an existing object the user is allowed to act on.
  4. Do not build post action redirects from request input; use a fixed destination or an allowlist.
  5. Add tests that send conflicting parameters and assert that the request is rejected or resolved consistently.

Hunting notes

These bugs cluster around intent, share and OAuth style endpoints, especially where a product supports both usernames and numeric identifiers. Recon signals worth watching: endpoints with intent, share, action, confirm or redirect in the path, parameters named after the target object, and any page that echoes a query parameter into a confirmation prompt.

Difficulty: beginner. The technique is a single crafted URL and a click, and the reasoning needed is an understanding of how query parameters are parsed and prioritised.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 6 min read.

What happened, in plain words

Twitter has a feature called a web intent. It is a special page that helps you do one action on Twitter without leaving the site you are on. One of these pages is the follow intent, at twitter.com/intent/follow. You give it the name of an account, and it shows a small confirmation page asking whether you want to follow that account. If you click "follow", you follow it.

The researcher found that this page could be made to show one account while the click actually followed a different account. The whole trick is a single link. When a victim opens it, they see a prompt to follow one user, but clicking "follow" makes them follow someone else entirely.

The proof of concept is this URL:

HTTP
https://twitter.com/intent/follow?screen_name=twitter&screen_name=ericrtest3&user_id=113483807

Let us take it apart, piece by piece:

  • https://twitter.com/intent/follow is the address of the follow intent page.
  • The ? marks the start of the query string, the part of a URL that carries extra information to the page.
  • screen_name=twitter is the first target: the account name twitter.
  • screen_name=ericrtest3 is a second target with the same parameter name, a different account name.
  • user_id=113483807 is a numeric identifier for an account, a third way of naming a target.
  • The & characters separate these parameters from each other.

So the link names three targets at once: two account names and one numeric ID. The page appears to prompt the victim to follow one user, but when the victim clicks "follow", a completely different user is followed. The researcher calls the impact more dramatic than a previous submission, referenced as #95217, and says the trick can be used by spammers and social engineers to get a victim to follow them.

No severity rating or CVSS score is given, and the report does not describe a fix.

Why it matters

A follow is a small action, but it is tied to the victim's account and it is public. If a spammer can make people follow them without meaning to, their follower count and their apparent credibility grow. Other users see a followed account and assume someone chose to follow it. The victim's click was real, but the choice behind it was not. The report says spammers and social engineers can use this to trick a user into following them.

In general, how this kind of bug works

Intent and share pages are thin wrappers around an action. They read the request parameters, draw a confirmation page from them, and then submit the action using those same parameters. The bug appears when the two steps disagree about which parameter is the one that counts.

A useful comparison is a restaurant order. The waiter writes down your order, reads it back to you, and then hands a different slip to the kitchen. You agreed to one dish and got another. Here the confirmation page is the read-back and the follow action is the kitchen.

Common causes:

  1. Duplicate parameters. The server takes the first occurrence when drawing the page and the last when acting, or the reverse. The browser and the server may also disagree on ordering.
  2. Mixed identifiers. A human readable name and a numeric identifier are both accepted, and one is used for display while the other is used for the action.
  3. Client side rendering. The page is built in JavaScript from the query string, while the form posts a hidden field filled in by different logic.
  4. Redirects after the action. The page forwards the user to a URL taken from the request.

The result is a page whose visible content does not match the effect of the click. The defence is straightforward: resolve the target once, on the server, from a single canonical parameter, and use that resolved value for both the display and the action. Reject requests with conflicting or duplicated target parameters rather than guessing.

In general, how to test for it

Look for pages that show a confirmation or preview and then perform an action: follow, like, subscribe, add to list, share, invite, authorise an application. They usually take a target identifier in the query string.

  1. Send the normal request with one target parameter and confirm the page shows that target and the action applies to it.
  2. Send the request with the target parameter duplicated, with different values. Note which value the page displays.
  3. Complete the action and observe which target actually changed. A positive result is a mismatch between the displayed target and the applied target.
  4. Repeat with mixed identifier types, for example a name parameter plus a numeric identifier, and with parameters the page does not visibly use.
  5. Check the response after the action for a redirect taken from the request, and test whether that redirect can be pointed at another host.

A positive result is concrete: the page names one account and the action lands on another, or the page forwards to an attacker controlled destination. Common false positives are caching, where a stale page shows an old target, and cases where the second parameter is ignored entirely, so display and action still agree. Confirm the mismatch with a fresh session and a clean request before reporting.

In general, how it is fixed

  1. Accept a single canonical target parameter and ignore or reject duplicates.
  2. Resolve the target on the server before rendering, and pass the resolved identifier into the action so display and effect cannot diverge.
  3. Validate that any identifier in the request maps to an existing object the user is allowed to act on.
  4. Do not build post action redirects from request input; use a fixed destination or an allowlist.
  5. Add tests that send conflicting parameters and assert that the request is rejected or resolved consistently.

In general, where to hunt

These bugs cluster around intent, share and OAuth style pages, especially where a product supports both usernames and numeric identifiers. Signals worth watching: pages with intent, share, action, confirm or redirect in the path, parameters named after the target object, and any page that echoes a query parameter into a confirmation prompt.

Glossary

  • Web intent: a special page on a service that lets you perform one action, such as following an account, from a link.
  • Query string: the part of a URL after the ? that carries extra information to the page, made of parameters separated by &.
  • Parameter: a named value in a query string, such as screen_name=twitter.
  • Duplicate parameter: the same parameter name appearing more than once in one query string, with different values.
  • Screen name: a human readable account name on Twitter, such as twitter.
  • User ID: a numeric identifier for an account, such as 113483807.
  • Open redirect: a bug where a page forwards the user to a destination taken from the request, so an attacker can choose where the user lands.
  • Proof of concept: a small demonstration that shows a bug is real, here a single URL.
  • Social engineering: tricking a person into an action by manipulating what they see and believe.
  • Spammer: someone who sends unwanted or deceptive content at scale, often to build reach.
  • State change: a change to data tied to an account, such as adding a follow.
  • Server side: work done on the service's own computers, as opposed to in the visitor's browser.
  • Client side: work done in the visitor's browser, often by JavaScript.
  • Canonical parameter: the single, agreed parameter that the service treats as the real source of a value.
  • Allowlist: a fixed list of permitted values, used instead of trusting whatever the request supplies.
  • False positive: a result that looks like a bug but is not, for example a stale cached page.
  • Caching: storing a copy of a page so it can be served again quickly, which can show an out of date target.
  • Bounty: a payment made by a programme to a researcher for a valid report.
  • CVSS: a standard scoring system for the severity of a vulnerability.

More by ericr

View all

2 more disclosed reports, best first.

More from X / xAI

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.