Skip to content
Misconfiguration Disclosed report Intermediate

Http Response Splitting - Validate link

The verify_token parameter was reflected into a Set-Cookie response header without URL-encoding, allowing an attacker to inject newline characters and add arbitrary headers. An attacker could set cookies for the domain or bypass security headers, though the redirect response limited further exploitation.

gerben_javado Follow

Originally disclosed on HackerOne

Bounty$75 View original
  • Triaged in 8 days
  • Fixed in 17 days
  • Paid in 17 days
  • Disclosed after 20 days

So i found a http response splitting issue in your website. If we visit the following url:

https://www.binary.com/user/validate_link?step=account&verify_token=sometoken

We will get a response header that says:

Set-Cookie: verify_token=sometoken; expires=Wed, 28 Oct 2015 23:31:35 GMT; domain=.binary.com; path=/; secure

However this value doesnt seem to be urlencoded which gives the attacker the option to create his own response header. For example if you were to visit:

https://www.binary.com/user/validate_link?step=account&verify_token=%0aSet-Cookie:%20GerbenJavado=Awesome;%0a

The following response header will be included in the response: (shameless plug)

Set-Cookie: GerbenJavado=Awesome;

#Attacker Scenario Since this attack doesnt require any user interaction to be exploited, a attacker could do lots of fun stuff using this vulnerability by including a malicious url in a Iframe or even in a IMG tag.

  • As the example shows the attacker can set cookies for the user on binary.com
  • The attacker can disable or bypass security headers placed by the server

One restricition the attacker has is that the request is a redirect. This made it for me impossible to XSS attacks or Cache Poisining. Maybe you guys could look a bit into this further. However i would argue that because of the fact user interaction is not needed and the fact that the attacker can set his own headers (including cookies) the attack is fairly scary.

The original report as published on HackerOne, by gerben_javado. 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

What the attacker needed

Victim visits a crafted link or page

How it was found

  1. Visit the validate_link URL with a normal verify_token value and observe the Set-Cookie header.
  2. Replace the token with a value containing encoded newline characters and a new header.
  3. Observe that the injected header appears in the response.

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.

When a website sends a response, it includes headers that tell the browser things like which cookies to store. If a user-supplied value is placed into a header without cleaning, an attacker can sneak in extra line breaks and add their own headers. Here, the token value was not encoded, so an attacker could inject a fake cookie or other header.

What is Misconfiguration?

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

More by gerben_javado

View all

9 more disclosed reports, best first.

More from Deriv.com

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.