Skip to content
Leaked secrets Write-up Intermediate

coveo access token leak at js file for $1500

A JavaScript file exposed a Coveo access token that could be used to create search tokens for arbitrary users. An attacker with the token could generate search tokens, potentially accessing search data as other users.

medium.com

Published on medium.com

We were doing recon on a Bugcrowd public program and attempting to find information disclosure in JavaScript files. We grepped all subdomains using different tools, also brute-forcing subdomains, and then passed the results through Wayback and Gau tools to grep for JS files.

sushant, 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 a Coveo access token was hardcoded in a client-side JavaScript file, exposing it to anyone who could download the file.

Impact

An attacker could use the exposed token to create search tokens for arbitrary users, potentially accessing search data as those users.

What the attacker needed

Access to the JavaScript file; knowledge of Coveo API

How it was found

  1. Grepped all URLs from Wayback URLs/Gau.
  2. Collected all .js files.
  3. Filtered JS files using the command: httpx -content-type | grep 'application/javascript'.
  4. Performed a Nuclei scan with the template: nuclei -t /root/nuclei-templates/exposures/.
  5. Discovered a token in a JavaScript file and identified it as a Coveo access token.
  6. Used the token in the Authorization header of a request to create a search token for a user.

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.

A JavaScript file on a website accidentally included a secret token, like a password, that is used to talk to a search service called Coveo. Anyone who found that file could use the token to ask the search service to create new tokens for other users, which might let them see search results meant for those users.

What is Leaked secrets?

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.