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.
- 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:
- Invite user to your application.
- Give User full access.
- Now login the invited account, and create an index.
- Go back to admin account and remove the access to configure index.
- On Invited account, all index configuration options will disappear.
- 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"}
- 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
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
- Invite a user and grant them full access.
- Log in as the invited user and create an index.
- As admin, remove the invited user's permission to configure the index.
- Confirm the configuration options disappear for the invited user.
- Replay the earlier index operation request with a new destination name.
- 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.