Skip to content
Access control Disclosed report Intermediate

PATCH method manipulation allowing the users to escalate their functionalities and edit (upgrade/downgrade) API Keys settings which is not allowed

An admin-level user could send a PATCH request to an API key endpoint that was only meant for deletion, allowing them to edit the key's description and role assignments. This let them upgrade or downgrade API key permissions, including assigning a higher-privileged role.

bugsv2 Follow

Originally disclosed on HackerOne

  • Triaged in 9 days
  • Fixed in 30 days
  • Paid in 9 days
  • Disclosed after 6 months

Summary:

Hey sup, Hope you are doing well today Inshaallah <3

I found a misonfiguration today would allow the users to edit the API Keys Info, description, createdAT, roleIds and manipulate all of them

Let me show you something first ..

It’s only allowed for all the users, Owners or Admins → Just to create new API Key and remove API Key

██████

Like this screen, There’s no area to edit your API Key, But the users actually still has the access to edit it, By using PATCH method

What the PATCH method means?

After some searching .. I found out that the delete request is: DELETE /frontegg/identity/resources/tenants/api-tokens/v1/<API_KEY_ID>

and here is the Idea !! The group actually can be edited by sending PATCH and can be deleted with DELETE, So could the API be the same?

I tried actually and It worked with me !!

█████

Steps to reproduce:

  1. Create Account A and Account B

  2. Invite Account B with role Admin to ⇒ Account’s A Panel

  3. Now From Account A, “██████████████The owner”.█████████ Create an API Key with role Owner

    ████

  4. Now go the Account B (█████████████The Admin████████████████) and try to delete the Key, But don’t delete it !! Just ███████████Intercept████████████ and move it to repeater, and ███████████████drop it█████████████████ !!

  5. Now change DELETE to PATCH as method ..

  6. Now You have those fields to control,

  7. Let’s send something like: {"description":"desc111111","roleIds":["c22321ba-8ece-426d-b418-ece2a6d72009"]}

and c22321ba-8ece-426d-b418-ece2a6d72009 refers to role: Impersonator 8. Now It’s successfully changed ^_^

███
  1. Thank You <3

Possible Scenarios:

  • Let’s say the Owner has 2 admins with him, and he created some API Keys with the “Owner” Permission, Which he would use by himself, The Admins now can edit this API key with our bug and downgrade the API token permissions or remove it at all, Now the API Key is bad one, The admin would have to remove it and create new one and configure his settings again and again and again

██████████████████and who did this? ::█████████████ No body knows man !! It’s not even allowed !!

  • Admins can too downgrade and upgrade the API key which is “under the admin”

Applying a Fix:

  • remove the PATCH method from endpoint: /frontegg/identity/resources/tenants/api-tokens/v1/<API_KEY_ID>

Impact

  • PATCH method manipulation allowing the users to escalate their functionalities and edit (upgrade/downgrade) API Keys settings which is not allowed
  • broken access control to not allowed functionalities
  • Users can edit the API Key’s info which is not allowed

The original report as published on HackerOne, by bugsv2. 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 API endpoint for deleting an API key also accepted PATCH requests without checking whether the caller was allowed to edit that key's fields.

What the attacker needed

An admin account in the target tenant; ability to intercept HTTP requests; an existing API key created by the owner

How it was found

  1. Create two accounts, A and B.
  2. Invite account B as an Admin to account A's panel.
  3. From account A (the owner), create an API key with the Owner role.
  4. As account B (the admin), intercept the delete request for that key and drop it.
  5. Change the request method from DELETE to PATCH.
  6. Send a PATCH body with a new description and a role ID for a different role (e.g., Impersonator).

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 API key is like a password that lets a program act on your behalf. The website only showed buttons to create and delete these keys, but the server also accepted a different request type (PATCH) that let an admin change the key's settings, including its permissions. This meant an admin could secretly give a key more power than they were supposed to have.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by bugsv2

View all

4 more disclosed reports, best first.

More from Frontegg

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.