Skip to content
IDOR Disclosed report Beginner

[IDOR] Attacker user can Approve/Decline AFK on the behalf of other users

The AFK approval endpoint did not check that the responder belonged to the same organisation as the request owner, so changing the responder user id let an attacker approve or decline another user's AFK request. An attacker with an account could therefore act on AFK requests belonging to users in other organisations.

sachin_kr Follow

Originally disclosed on HackerOne

  • Fixed in 30 hours
  • Paid in 30 hours
  • Disclosed after 32 days

Summary:

Hi team Hope you are good Missing proper authorization checks on the vulnerable request allows an attacker to approve/decline afk of users on the behalf of other user who is a member of other organization. This can be exploited simply by changing the responder_user_id in the vulnerable request.

Platform(s) Affected:

[Happy tools / Website]

Steps To Reproduce:

  1. Create two accounts for happy tools and login into two different browsers say accounts 1 and 2 and browser A and B.
  2. Configure browser A with burp proxy
  3. Put an AFK request.
  4. Go to https://schedule.happy.tools/afk and click on approve or decline and capture the request in burp.
  5. Now replace the value of responder_user_id with the user id of account 2.
  6. Valid response is shown.

Supporting Material/References:

F621606 In this screenshot, the user_id: 1920 is the id of user who belongs to account 1 and the responder_user_id:1923 is the id of user B who belongs to different account and both users belong to different organizations.

###Vulnerable request :

POST /wpcom/v2/happytools/external/v1/schedule/afk-requests/12346 HTTP/1.1
Host: public-api.wordpress.com
Connection: close
Content-Length: 208
Accept: application/json, text/plain, */*
Origin: https://schedule.happy.tools
Authorization: ZZZZZZZZZZZZZZZZZ
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Sec-Fetch-Mode: cors
Content-Type: application/json;charset=UTF-8
Sec-Fetch-Site: cross-site
Referer: https://schedule.happy.tools/afk
Accept-Encoding: gzip, deflate
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8

{"notes":"\">","timezone":"Africa/Bamako","approval_status":2,"end_at":1572048000,"is_last_minute":false,"responded_at":1572472124,"responder_user_id":1923,"start_at":1572048000,"type_id":1808,"user_id":1920}

Impact

Using this issue an attacker to approve/decline AFK of users on the behalf of other user who is a member of other organization. This can be exploited simply by changing the responder_user_id parameter in the vulnerable request For more info please let me know Thanks, regards Sachin

Attachments

Screenshot_from_2019-10-31_03-41-28.png
Screenshot_from_2019-10-31_03-41-28.png From the original on HackerOne

The original report as published on HackerOne, by sachin_kr. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the endpoint trusted the responder_user_id supplied in the request body instead of checking that the authenticated user was authorised to respond to that AFK request.

Impact

An attacker could approve or decline AFK requests on behalf of users in other organisations.

What the attacker needed

Two accounts on happy tools; a proxy to edit requests; an existing AFK request

How it was found

  1. Create two accounts and log in to each in a separate browser.
  2. Configure one browser to send traffic through a proxy.
  3. Submit an AFK request.
  4. On the AFK page, approve or decline and capture the request.
  5. Replace the responder_user_id value with the second account's user id.
  6. Observe that the server returns a valid response.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

An AFK request is a message asking a manager to approve time away from work. The server accepted a request that named a different person as the approver without checking that this person was allowed to approve it. By swapping one number in the request, someone from another company could approve or reject another person's time-off request.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

More by sachin_kr

View all

3 more disclosed reports, best first.

More from Automattic

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.