Skip to content
Access control Write-up Beginner

Regeneration of API key by low level user: 500$ Access Control bug

A low-privilege user could call an API endpoint intended for administrators to regenerate the API key of a test suite. This allowed unauthorised regeneration of API keys, potentially disrupting or compromising the test suite.

a13h1 Follow

Published on medium.com

I recently uncovered a flaw permits regular users to regenerate API keys for the test suite, utilizing an API endpoint originally designated for administrators only. This article outlines the issue, its potential impact, and the steps to reproduce the vulnerability.

Abhi Sharma, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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

How it worked

Root cause

Likely the API endpoint lacked a proper authorisation check, allowing any authenticated user to perform an admin-only action.

Impact

An attacker with a low-level account could regenerate API keys for test suites, potentially disrupting integrations or gaining unauthorised access to the test suite.

What the attacker needed

A low-level user account; an admin account to capture the request; ability to intercept HTTP requests

How it was found

  1. Create two accounts: one admin and one low-level user.
  2. In the admin account, go to API key regeneration and click generate.
  3. Intercept the request that is sent.
  4. Log in as the low-level user.
  5. Send the captured request using the low-level user's session.
  6. Forward the request.

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 write-up has not been written yet. The Original tab links to the source.

An API key is like a password that lets a program talk to a service. The report shows that a normal user could trigger a special action (regenerating that key) that should only be allowed for admins. This means the service did not check whether the person making the request had the right permissions.

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 a13h1

View all

8 more disclosed reports, best first.

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.