Skip to content
Open redirect Disclosed report Intermediate

Chained open redirects and use of Ideographic Full Stop defeat Twitter's approach to blocking links

Twitter's link validation could be bypassed by chaining two open redirects and using an Ideographic Full Stop in the target URL, allowing an attacker to post links to forbidden domains in tweets.

Julien Cretel Follow

Originally disclosed on HackerOne

Bounty$560 Medium 5.7 View original
  • Triaged in 20 days
  • Fixed in 7 months
  • Paid in 53 days
  • Disclosed after 2.1 years

Summary: A chain of two open redirects (on analytics.twitter.com and twitter.com), coupled with the use of an Ideographic Full Stop allows an attacker to defeat Twitter's approach to blocking links.

Description: Twitter maintains a deny list of domain names and prevents users from tweeting (direct or indirect) links to those domains. Most notably perhaps, Twitter recently added (tsk tsk...) ddosecrets.com to that deny list. The link validation performed by the backend is a black box (not documented anywhere public, as far as I know). However, I have found a way to defeat it. By combining the following two open (one internal, one external) redirects,

  • https://twitter.com/login?redirect_after_login=ONLY_TWITTER_SUBDOMAINS_ALLOWED_URL
  • https://analytics.twitter.com/daa/0/daa_optout_actions?action_id=4&rd=ARBITRARY_URL%3F (note the URL-encoded question mark at the end)

and using an Ideographic Full Stop in place of the ASCII period in the malicious target URL, it's possible to craft a URL that redirects to the forbidden domain name but that Twitter allows users to post in tweets.

Steps To Reproduce:

  1. Choose the target URL; let's take https://ddosecrets.com as an example.
  2. Replace all occurrences of the ASCII period by the URL-encoded version of the Ideographic Full Stop, i.e. %E3%80%82: https://ddosecrets%E3%80%82com.
  3. URL-encode the result of step 2: https%3A%2F%2Fddosecrets%25E3%2580%2582com.
  4. Append the result of step 3 to https://analytics.twitter.com/daa/0/daa_optout_actions?action_id=4&rd= and append %3F to the result: https://analytics.twitter.com/daa/0/daa_optout_actions?action_id=4&rd=https%3A%2F%2Fddosecrets%25E3%2580%2582com%3F.
  5. URL-encode the result of step 4: https%3A%2F%2Fanalytics.twitter.com%2Fdaa%2F0%2Fdaa_optout_actions%3Faction_id%3D4%26rd%3Dhttps%253A%252F%252Fddosecrets%2525E3%252580%252582com%253F.
  6. Append the result of step 5 to https://twitter.com/login?redirect_after_login=: https://twitter.com/login?redirect_after_login=https%3A%2F%2Fanalytics.twitter.com%2Fdaa%2F0%2Fdaa_optout_actions%3Faction_id%3D4%26rd%3Dhttps%253A%252F%252Fddosecrets%2525E3%252580%252582com%253F.
  7. Log in to Twitter and tweet the URL resulting from step 6. Posting the tweet will succeed (but it shouldn't, if link validation were effective).
  8. Click the malicious link in the tweet you just posted; you'll get redirected to the forbidden domain without being shown any Twitter interstitial page.

(If you're not logged in to Twitter when you click the malicious link, you'll get prompted to log in, but you will still get redirected to the forbidden domain afterwards.)

Supporting Material/References:

See attached proof-of-concept video.

Impact

Attackers can defeat Twitter's approach to blocking links and post arbitrary unsafe links (starting with https://twitter.com, which really compounds the problem) in tweets.

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

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. 6 min read.

Context

Twitter maintains a deny list of domain names and prevents users from tweeting links, direct or indirect, to those domains. The report gives ddosecrets.com as an example of a domain that had recently been added to that list. The validation of links performed by the backend is, in the researcher's words, a black box: it is not documented anywhere public as far as they know.

The feature under attack is therefore not a single endpoint but the link-validation layer that sits in front of tweeting. The researcher found a way to defeat it by combining two open redirects, one internal and one external, with a Unicode character that looks like a period.

Setup

The only precondition stated in the report is a Twitter account: step 7 of the reproduction requires the attacker to log in to Twitter and tweet the crafted URL. No special role, tool or version is mentioned. The researcher also notes a variant of the behaviour for a victim who is not logged in: clicking the malicious link prompts them to log in, but they are still redirected to the forbidden domain afterwards.

Finding it

The researcher identified two open redirects on Twitter properties:

  • https://twitter.com/login?redirect_after_login=ONLY_TWITTER_SUBDOMAINS_ALLOWED_URL, an internal redirect that only accepts Twitter subdomains as its destination.
  • https://analytics.twitter.com/daa/0/daa_optout_actions?action_id=4&rd=ARBITRARY_URL%3F, an external redirect that accepts an arbitrary URL, with the note that the URL-encoded question mark at the end matters.

Neither redirect is enough on its own: the first only points at Twitter subdomains, and the second lives on analytics.twitter.com, which is itself a Twitter subdomain. Chaining them means the first redirect's subdomain restriction is satisfied by the second redirect's host, and the second redirect then sends the browser anywhere.

The remaining problem is the deny list itself. The researcher's observation is that replacing the ASCII period in the target URL with an Ideographic Full Stop, URL-encoded as %E3%80%82, produces a URL that the backend validation lets through while the browser still ends up at the forbidden domain. The report does not explain the backend's parsing in detail; it only states that this substitution defeats the validation.

Exploitation

Step 1: choose the target

The example target is the forbidden domain itself:

Text
https://ddosecrets.com

Step 2: replace the ASCII periods

Every ASCII period in the target is replaced by the URL-encoded Ideographic Full Stop, %E3%80%82:

Text
https://ddosecrets%E3%80%82com

This is the form that the link validation apparently fails to recognise as the forbidden domain.

Step 3: URL-encode the result

The URL from step 2 is encoded once more, so that it can be carried as a parameter value:

Text
https%3A%2F%2Fddosecrets%25E3%2580%2582com

Note that the percent signs of the Ideographic Full Stop are themselves encoded, giving %25E3%2580%2582.

Step 4: build the analytics redirect

The encoded URL is appended to the rd parameter of the external redirect, and %3F (an encoded question mark) is appended to the end:

Text
https://analytics.twitter.com/daa/0/daa_optout_actions?action_id=4&rd=https%3A%2F%2Fddosecrets%25E3%2580%2582com%3F

The trailing encoded question mark is called out explicitly in the report as something to note.

Step 5: URL-encode the analytics URL

The whole analytics URL is encoded so it can be nested inside the next parameter:

Text
https%3A%2F%2Fanalytics.twitter.com%2Fdaa%2F0%2Fdaa_optout_actions%3Faction_id%3D4%26rd%3Dhttps%253A%252F%252Fddosecrets%2525E3%252580%252582com%253F

Step 6: wrap it in the login redirect

The encoded analytics URL is appended to the redirect_after_login parameter of the internal redirect:

Text
https://twitter.com/login?redirect_after_login=https%3A%2F%2Fanalytics.twitter.com%2Fdaa%2F0%2Fdaa_optout_actions%3Faction_id%3D4%26rd%3Dhttps%253A%252F%252Fddosecrets%2525E3%252580%252582com%253F

The outer URL starts with https://twitter.com, and its destination is a Twitter subdomain, which satisfies the internal redirect's restriction.

Step 7: tweet the URL

Log in to Twitter and tweet the URL produced in step 6. The report states that posting the tweet succeeds, which it should not if link validation were effective.

Step 8: click the link

Clicking the malicious link in the posted tweet redirects the browser to the forbidden domain without showing any Twitter interstitial page. If the person clicking is not logged in to Twitter, they are prompted to log in, but after that they are still redirected to the forbidden domain.

A proof-of-concept video is referenced as supporting material, but no further detail about it is given in the text.

Root cause

The report describes the link validation as an undocumented black box and does not identify the specific parsing mistake inside it. What the report does establish is the combination that defeats it: a chain of two open redirects, where the internal one only permits Twitter subdomains and the external one on analytics.twitter.com accepts an arbitrary destination, plus an Ideographic Full Stop in place of the ASCII period in the forbidden hostname. The report does not identify the specific parsing mistake inside the validator.

The redirect chain also matters because the URL that is validated and displayed begins with https://twitter.com, which the researcher describes as really compounding the problem.

Impact

An attacker can defeat Twitter's approach to blocking links and post arbitrary unsafe links in tweets, starting with https://twitter.com, which the researcher notes compounds the problem. The report does not describe any further consequence beyond the redirect to the forbidden domain and the absence of an interstitial page.

Fix

Based on the described behaviour, the fixes would be to close the two open redirects, in particular the rd parameter on analytics.twitter.com that accepts an arbitrary URL, and to normalise hostnames in link validation so that Unicode characters such as the Ideographic Full Stop are treated the same way a browser treats them before the deny list is applied.

Variants to test

  • Other Unicode characters that browsers treat as label separators, substituted for the ASCII period in a forbidden hostname, then passed through the same encoding steps. A positive result is a tweet that posts successfully and a click that reaches the forbidden domain.
  • Other redirect parameters on Twitter subdomains that accept an arbitrary URL, used as the inner redirect in place of the daa_optout_actions endpoint. A positive result is the same chain working with a different inner endpoint.
  • Other internal redirects restricted to a set of allowed hosts, where one of those allowed hosts itself has an open redirect. A positive result is a URL that passes the restriction and still leaves the allowed host.
  • The same chain clicked by a logged-out user. A positive result is a login prompt followed by the redirect to the forbidden domain, as described in the report.

Hunting notes

This kind of bug tends to hide where a validator and a browser disagree about what a URL means: Unicode normalisation, percent-encoding layers, and redirect parameters that accept a full URL. During recon, the signals are redirect parameters on subdomains of the target that take a URL as a value, and internal redirects whose allow list is a set of the target's own subdomains, since any open redirect on one of those subdomains completes the chain. The researcher showed impact by tweeting the crafted URL, which was accepted, and clicking it reached the forbidden domain without an interstitial.

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. 12 min read.

What happened, in plain words

Twitter keeps a list of websites it does not want people to share on its platform. If you try to tweet a link to one of those sites, Twitter is supposed to stop you. The researcher found a way around that block. They could post a link that gets accepted by Twitter and then sends anyone who clicks it to a forbidden website.

The trick uses two separate weaknesses in Twitter's own pages, called open redirects, plus a special Unicode character that looks like a full stop but is not the ordinary one. Put together, these let the researcher post a link to a banned site in a tweet, and clicking it took the reader straight there with no warning page in between.

This write-up walks through the same steps the researcher described, in the same order, explaining each idea from scratch.

The background you need first

What a deny list is

A deny list (sometimes called a blocklist) is simply a list of things that are not allowed. Think of a guest list at a club, but inverted: instead of names that get in, it holds names that are turned away. Twitter keeps a deny list of domain names, and it tries to stop users from tweeting links to those domains, whether the link is written out directly or hidden inside another link.

A domain name is the part of a web address that identifies the website, such as twitter.com or ddosecrets.com. The report gives ddosecrets.com as an example of a domain that had recently been added to Twitter's deny list.

What link validation is

When you post a tweet containing a link, Twitter's servers check the link before accepting the tweet. This checking is called link validation. The report describes this validation as a black box: it is not documented anywhere public, as far as the researcher knows. A black box means you can see what goes in and what comes out, but not how the inside works. The researcher could see which links were accepted and which were rejected, but not the exact rules the server used.

What an open redirect is

A redirect is when a web page sends your browser somewhere else automatically. You click one address, and the server replies, in effect, "not here, go there instead". An open redirect is a redirect where the destination is taken from part of the address you supplied, and the server does not check where that destination points. That means anyone can craft a link on the trusted site that sends visitors to any site they like.

A simple everyday comparison: imagine a receptionist at a trusted office who will forward your parcel to any address you write on a sticky note, without checking it. The office looks trustworthy, but the parcel can end up anywhere.

What URL encoding is

Web addresses can only contain certain characters safely. URL encoding is a way of writing other characters using a percent sign followed by two hexadecimal digits (hexadecimal is just a number system using 0 to 9 and A to F). For example, a colon : becomes %3A, a slash / becomes %2F, and a question mark ? becomes %3F. A space becomes %20.

This matters because when one address is placed inside another address as a value, the special characters have to be encoded so they are not mistaken for the structure of the outer address. Each time you nest one address inside another, you encode it once more, and the percent signs themselves get encoded as %25.

What the Ideographic Full Stop is

The ordinary full stop (period) on a keyboard is the ASCII character .. There is also a different character in Unicode, the international standard for text characters, called the Ideographic Full Stop, written 。. It looks like a small circle and is used in some East Asian writing. Its Unicode code point is U+3002, and when URL-encoded it becomes %E3%80%82.

The report does not say how browsers treat this character. The report does not explain how the validator reads the address.

What the feature under attack is

The feature is not a single page. It is the link-validation layer that sits in front of tweeting. Every time someone tweets a link, this layer is supposed to check it against the deny list. The researcher found a way to make a link that this layer accepts, even though a browser will end up at a forbidden domain.

What you need to try it

The only precondition stated in the report is a Twitter account. Step 7 of the reproduction requires the attacker to log in to Twitter and tweet the crafted URL. No special role, tool or software version is mentioned.

The researcher also notes what happens to a victim who is not logged in: clicking the malicious link prompts them to log in, but they are still redirected to the forbidden domain afterwards.

Finding the two redirects

The researcher identified two open redirects on Twitter's own properties:

  • https://twitter.com/login?redirect_after_login=ONLY_TWITTER_SUBDOMAINS_ALLOWED_URL, an internal redirect that only accepts Twitter subdomains as its destination.
  • https://analytics.twitter.com/daa/0/daa_optout_actions?action_id=4&rd=ARBITRARY_URL%3F, an external redirect that accepts an arbitrary URL, with the note that the URL-encoded question mark at the end matters.

A subdomain is a smaller section of a larger domain. In analytics.twitter.com, the analytics part is a subdomain of twitter.com. Twitter owns both, so both count as Twitter addresses.

Neither redirect is enough on its own. The first one only points at Twitter subdomains, so it cannot send you to an outside site by itself. The second one lives on analytics.twitter.com, which is itself a Twitter subdomain, and it will send you anywhere. Chaining them means the first redirect's subdomain restriction is satisfied by the second redirect's host, and the second redirect then sends the browser anywhere.

A comparison: the first guard only lets you through a door marked "staff only", and the second guard, who is standing inside the staff area, will open any other door you ask for. Because the second guard is already inside the staff area, the first guard is happy to let you reach them.

The remaining problem is the deny list itself. The researcher's observation is that replacing the ordinary full stop in the target URL with an Ideographic Full Stop, URL-encoded as %E3%80%82, produces a URL that the backend validation lets through while the browser still ends up at the forbidden domain.

Exploitation, step by step

Step 1: choose the target

The example target is the forbidden domain itself:

Text
https://ddosecrets.com

This is the site the attacker wants people to reach, and the site Twitter's deny list is meant to block. Everything that follows is about disguising this destination so the validator does not recognise it.

Step 2: replace the ordinary full stops

Every ordinary full stop in the target is replaced by the URL-encoded Ideographic Full Stop, %E3%80%82:

Text
https://ddosecrets%E3%80%82com

Why do this? The report states that this substitution defeats the validation, without explaining how. This is the form that the link validation apparently fails to recognise as the forbidden domain, while a browser treats the character as a label separator.

Step 3: URL-encode the result

The URL from step 2 is encoded once more, so that it can be carried as a parameter value:

Text
https%3A%2F%2Fddosecrets%25E3%2580%2582com

Why encode again? Because this address is about to be placed inside another address as the value of a parameter. The colon and slashes become %3A and %2F so they are not mistaken for the structure of the outer address. Note that the percent signs of the Ideographic Full Stop are themselves encoded, giving %25E3%2580%2582. The %25 is an encoded percent sign, so when the outer layer is decoded, the inner layer still reads %E3%80%82.

Step 4: build the analytics redirect

The encoded URL is appended to the rd parameter of the external redirect, and %3F (an encoded question mark) is appended to the end:

Text
https://analytics.twitter.com/daa/0/daa_optout_actions?action_id=4&rd=https%3A%2F%2Fddosecrets%25E3%2580%2582com%3F

Why this step? This is the inner redirect, the one that will actually send the browser to the forbidden domain. The rd parameter is the part that takes an arbitrary destination. The trailing encoded question mark is called out explicitly in the report as something to note; it is part of making the redirect work as intended.

Step 5: URL-encode the analytics URL

The whole analytics URL is encoded so it can be nested inside the next parameter:

Text
https%3A%2F%2Fanalytics.twitter.com%2Fdaa%2F0%2Fdaa_optout_actions%3Faction_id%3D4%26rd%3Dhttps%253A%252F%252Fddosecrets%2525E3%252580%252582com%253F

Why? Because this whole address is about to become the value of a parameter in the outer redirect. Every special character in it, including the ?, =, & and the percent signs, has to be encoded so the outer address keeps its own structure. Notice the layers: %253A is an encoded %3A, and %2525 is an encoded %25, which in turn is an encoded percent sign.

Step 6: wrap it in the login redirect

The encoded analytics URL is appended to the redirect_after_login parameter of the internal redirect:

Text
https://twitter.com/login?redirect_after_login=https%3A%2F%2Fanalytics.twitter.com%2Fdaa%2F0%2Fdaa_optout_actions%3Faction_id%3D4%26rd%3Dhttps%253A%252F%252Fddosecrets%2525E3%252580%252582com%253F

Why? This is the outer layer. The address starts with https://twitter.com, and its destination is a Twitter subdomain, which satisfies the internal redirect's restriction. The browser, following the chain, ends up at the forbidden domain.

Step 7: tweet the URL

Log in to Twitter and tweet the URL produced in step 6. The report states that posting the tweet succeeds, which it should not if link validation were effective. In other words, the deny list did not catch the disguised destination.

Step 8: click the link

Clicking the malicious link in the posted tweet redirects the browser to the forbidden domain without showing any Twitter interstitial page. An interstitial page is the warning screen some services show before sending you to an external site; here there was none. If the person clicking is not logged in to Twitter, they are prompted to log in, but after that they are still redirected to the forbidden domain.

A proof-of-concept video is referenced as supporting material, but no further detail about it is given in the text.

Why it works

The report describes the link validation as an undocumented black box and does not identify the specific parsing mistake inside it. What the report does establish is the combination that defeats it: a chain of two open redirects, where the internal one only permits Twitter subdomains and the external one on analytics.twitter.com accepts an arbitrary destination, plus an Ideographic Full Stop in place of the ordinary full stop in the forbidden hostname.

The report does not identify the specific parsing mistake inside the validator. Normalising means converting different but equivalent spellings into one standard form before comparing. The report itself does not say this.

The redirect chain also matters because the URL that is validated and displayed begins with https://twitter.com, which the researcher describes as really compounding the problem.

Impact

An attacker can defeat Twitter's approach to blocking links and post arbitrary unsafe links in tweets, starting with https://twitter.com, which the researcher notes compounds the problem.

Fix

Based on the described behaviour, the fixes would be to close the two open redirects, in particular the rd parameter on analytics.twitter.com that accepts an arbitrary URL, and to normalise hostnames in link validation so that Unicode characters such as the Ideographic Full Stop are treated the same way a browser treats them before the deny list is applied.

Variants to test

  • Other Unicode characters that browsers treat as label separators, substituted for the ordinary full stop in a forbidden hostname, then passed through the same encoding steps. A positive result is a tweet that posts successfully and a click that reaches the forbidden domain.
  • Other redirect parameters on Twitter subdomains that accept an arbitrary URL, used as the inner redirect in place of the daa_optout_actions endpoint. A positive result is the same chain working with a different inner endpoint.
  • Other internal redirects restricted to a set of allowed hosts, where one of those allowed hosts itself has an open redirect. A positive result is a URL that passes the restriction and still leaves the allowed host.
  • The same chain clicked by a logged-out user. A positive result is a login prompt followed by the redirect to the forbidden domain, as described in the report.

Hunting notes

This kind of bug tends to hide where a validator and a browser disagree about what a URL means: Unicode normalisation, percent-encoding layers, and redirect parameters that accept a full URL. During recon, the signals are redirect parameters on subdomains of the target that take a URL as a value, and internal redirects whose allow list is a set of the target's own subdomains, since any open redirect on one of those subdomains completes the chain. The researcher showed impact by tweeting the crafted URL, which was accepted, and clicking it reached the forbidden domain without an interstitial.

Glossary

  • Deny list: a list of things that are not allowed, such as domain names that may not be shared.
  • Domain name: the part of a web address that identifies a website, such as twitter.com.
  • Subdomain: a smaller section of a larger domain, such as analytics in analytics.twitter.com.
  • Link validation: the server-side checking of a link before a post is accepted.
  • Black box: a system whose inputs and outputs you can observe but whose internal workings are not documented or visible.
  • Open redirect: a redirect whose destination is taken from the address supplied by the visitor, without checking where it points.
  • Redirect: an automatic instruction from a server telling the browser to go to a different address.
  • URL encoding: writing special characters as a percent sign followed by two hexadecimal digits, such as %3A for a colon.
  • Hexadecimal: a number system using the digits 0 to 9 and the letters A to F.
  • ASCII: the basic character set that includes the ordinary full stop ..
  • Unicode: the international standard that assigns a code to every text character.
  • Ideographic Full Stop: the Unicode character 。 (U+3002), which looks like a small circle and is treated by browsers as a domain separator.
  • Normalisation: converting different but equivalent spellings of something into one standard form before comparing them.
  • Parameter: a named value attached to the end of a web address, usually after a ?, such as rd=....
  • Interstitial page: a warning or intermediate screen shown before sending a visitor to an external site.
  • Proof of concept: a demonstration that a vulnerability can actually be exploited.
  • Recon: the information-gathering phase of security testing, where you look for useful features and parameters.

More by Julien Cretel

View all

5 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.

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.