Skip to content
Info disclosure Write-up Beginner

What is Algolia

Algolia search API keys with excessive permissions (such as listIndexes, editSettings, logs) were exposed in client-side code and mobile apps, allowing attackers to list internal indexes containing sensitive documents, modify index settings to inject JavaScript, and access search logs with IP addresses and cookies. The author found this misconfiguration on many sites and reported it to around 100 companies.

Me9187 Follow

Published on secjuice.com

I came across this last year while doing reconnaissance for a bug bounty program, I assumed it was just another API which was meant to be public, but after digging deeper I found that a particular program was using the admin API key instead of the public search key, this led me to finding a large amount of internal…

Me9187 (@Me9187), on secjuice.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 developers copied example code from Algolia's documentation that included an admin API key instead of generating and using a search-only key, leading to excessive permissions being exposed in client-side code and mobile apps.

Impact

Attackers could access internal documents, inject malicious JavaScript to steal credentials or card information, and view search logs containing IP addresses and cookies; the author reported this to around 100 companies, but the text does not confirm whether the issue was fixed.

What the attacker needed

Algolia API key exposed in client code; Key has excessive permissions

The fix

In the Algolia dashboard, ensure the search-only key only has the 'search' permission; if not, revoke it and generate a new search-only key, and consider using 'Secure Keys'.

How it was found

  1. Find the applicationID and API key in the source code or mobile app.
  2. Send a GET request to the Algolia API endpoint with the applicationID and API key to retrieve the key's permissions.
  3. If the key has listIndexes permission, list all indexes to find sensitive documents.
  4. If the key has editSettings permission, modify index settings to inject JavaScript that runs when search is used.

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.

Algolia is a service that provides search functionality for websites. Websites are given special keys to access their search data, and these keys have different permissions. If a website accidentally uses a key with too many permissions (like an admin key) instead of a limited search-only key, anyone who finds that key can access or change more than intended, such as viewing internal documents or injecting malicious code.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.