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.
Originally disclosed on HackerOne
- 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:
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.
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
- Visit the validate_link URL with a normal verify_token value and observe the Set-Cookie header.
- Replace the token with a value containing encoded newline characters and a new header.
- 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.