CRLF Injection: Session Fixation

CRLF and header injectionExploitation

From PayloadsAllTheThings by Swissky and contributors, under the MIT licence. Shown as written; the title and classification are ours. Licences. Its authors can have this tip removed by writing to abuse@bugbountytips.org.

A typical HTTP response header looks like this:

http
HTTP/1.1 200 OK
Content-Type: text/html
Set-Cookie: sessionid=abc123

If user input value\r\nSet-Cookie: admin=true is embedded into the headers without sanitization:

http
HTTP/1.1 200 OK
Content-Type: text/html
Set-Cookie: sessionid=value
Set-Cookie: admin=true

Now the attacker has set their own cookie.

Comments

No comments yet.