Lucene search

K
huntrMyyxlB1CE040C-9ED1-4D36-9B48-82DF42310868
HistoryMay 15, 2022 - 12:39 p.m.

Server Side Request Forgery via location header

2022-05-1512:39:31
myyxl
www.huntr.dev
203
ssrf bypass
redirection header
proof of concept
bug bounty
http redirect

EPSS

0.001

Percentile

51.0%

Description

It is possible to bypass current SSRF checks using a redirection via the location header.

Proof of Concept

1.) Mock a redirect endpoint using https://beeceptor.com/

2.) Add Location: http://localhost:1122as a response header and set the status code to 301

3.) Listen on port 1122

4.) Access the following resource: /proxy?url=http://<id>.free.beeceptor.com (http is important here)

5.) The request will be made to localhost:1122


From my understanding the code implements its own redirection handling by reading the location header and doing a new request. But this happens after setInstanceFollowRedirects is set to true. By setting it to true the connection will follow redirects automatically before any checks.

EPSS

0.001

Percentile

51.0%

Related for B1CE040C-9ED1-4D36-9B48-82DF42310868