Skip to content
Access control Disclosed report Intermediate

User with limited access to Index configuration can rename the Index

A user whose index configuration permission had been revoked could still rename an index by replaying a previously captured operation request. The stale API key kept the old full-access rights, so the permission change did not actually take effect on the API side.

bugs3ra Follow

Originally disclosed on HackerOne

Bounty$200 View original
  • Triaged in 2 months
  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 6 months

Summary by the researcher

Privilege escalation Issue when User privilege is changed from Full access to limited access. The changes doesn't apply resulting ACL to API keys

The report

HI,

I just noticed that user with limited access to any index can still rename it by replaying the old request after changing some values in the post request.

Steps:

  1. Invite user to your application.
  2. Give User full access.
  3. Now login the invited account, and create an index.
  4. Go back to admin account and remove the access to configure index.
  5. On Invited account, all index configuration options will disappear.
  6. Post the following request.

POST /1/indexes/<index name>/operation?x-algolia-api-key=395d4963afcdba0c00f4e8847459a8fd&x-algolia-application-id=JC6IO59O0A&x-algolia-agent=Algolia%20for%20vanilla%20JavaScript%203.7.5 HTTP/1.1 Host: c1-in-2.algolianet.com User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0 Accept: application/json Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Referer: https://www.algolia.com/explorer Content-Length: 39 Origin: https://www.algolia.com Connection: keep-alive Pragma: no-cache Cache-Control: no-cache

{"operation":"move","destination":"put index name here"}

  1. Now reload the page, U'll notice the index will be having new name.

I guess, other changes can also be made like deleting or adding objects to this index.

Attachments

Index_Rename.webm From the original on HackerOne

The original report as published on HackerOne, by bugs3ra. 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 key issued under full access retained its original ACL after the user's role was downgraded, so authorisation was enforced against the key rather than the current user permissions.

Impact

A user with reduced permissions could still rename an index, and the reporter suspects other operations such as deleting or adding objects may also be possible.

What the attacker needed

Admin grants then revokes index config access; attacker keeps the old API key

How it was found

  1. Invite a user and grant them full access.
  2. Log in as the invited user and create an index.
  3. As admin, remove the invited user's permission to configure the index.
  4. Confirm the configuration options disappear for the invited user.
  5. Replay the earlier index operation request with a new destination name.
  6. Reload and observe the index has been renamed.

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.

When you give someone access to part of an app, the app should check their rights every time they act. Here the check was tied to an old key that still carried the earlier, wider rights, so the person could keep doing things after their access was reduced. Replaying an old request is just sending a saved request again.

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 bugs3ra

View all

15 more disclosed reports, best first.

More from Algolia

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.