I was testing this application where the user’s can ask questions and the Super admins, Admins and other user’s can answer on a blog. User’s can change their names.

Here when I was checking the source code on the page where the comment had been made by user’s and answered by the Super admins, I saw role parameter with 24 character string 5bf7ae90736db01f8fa21a24.

The request for changing the name made to this following endpoint:

POST /api/user/change HTTP/2

This request was sending different parameters like name, email, mobile_no. My first thought was what if, I add role parameter with the string from the Admins who have answered on the blog. I did that and sent the request via repeater and nothing happened, I was having the same role.

After few tries with different parameters, I found that the server was taking roles parameter with array of different 24 character strings which points to different roles like Admin user and others.

I sent the request with the modified body like this,

{
"email_verified":true,
"roles":[
"5bf7ae90736db01f8fa21a24",
"5bf7ae3694db051f5486f845"],
"name":"Normal User",
"mobile_no":"9999999999"
}

And this worked, after refreshing my page I have Super Admin access on the website and I can perform all the actions that the Super Admins can do.

This was strange bug but it was very interesting one because I need to find the exact parameter roles to get the server to update my role as normal user.

I reported this to the team and they immediately fixed and rewarded a nice bounty for this report.

Hope so you have enjoyed this :)

Many Thanks

xploiterr