CRLF injection
The landing endpoint on ads.twitter.com reflected a user-supplied parameter into the HTTP response headers without sanitising carriage-return and line-feed characters. An attacker could therefore inject arbitrary response headers, such as a cookie-setting header.
- Triaged in 4 days
- Fixed in 12 days
- Paid in 20 days
- Disclosed after 13 months
Summary by the researcher
https://ads.twitter.com was vulnerability to HTTP response splitting in the endpoint https://ads.twitter.com/subscriptions/mobile/landing that allows to an attacker add a malicious header in the response headers.
PoC: https://ads.twitter.com/subscriptions/mobile/landing?t=%0d%0aSet-Cookie:%20csrf_id=injection%3b
The report
Hello twiiter security team,
on the domain ads.twitter.com http response splitting is vulnerability.
PoC: https://ads.twitter.com/subscriptions/mobile/landing?ref=gl-tw-tw-promote-mode?t=%0d%0atest:tested
Impact
an attacker can set new header
Attachments
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 inserted a query-string value into a response header without stripping CR and LF characters, allowing header injection.
Impact
An attacker could set arbitrary response headers, for example planting a cookie value in the victim's browser, though the report does not demonstrate any further consequence.
What the attacker needed
Victim opens a crafted link
How it was found
- Open the landing endpoint on ads.twitter.com with a crafted query parameter.
- Include encoded carriage-return and line-feed characters followed by a header name and value.
- The injected header is present 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 web server sends a page back to your browser, it first sends hidden 'headers' that carry instructions, such as which cookies to store. This site put part of the web address straight into those headers without cleaning it, so a crafted link could sneak extra instructions in. That lets an attacker make the browser store a cookie of their choosing.
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.