Skip to content
Leaked secrets Disclosed report Beginner

Leaking Rockset API key on Github

A Rockset API key was accidentally committed to a public GitHub repository and remained visible in an old commit. The reporter verified the key was still active but did not attempt any further actions, so the full impact is unknown.

fonte Follow

Originally disclosed on HackerOne

  • Triaged in 15 days
  • Fixed in 15 days
  • Disclosed after 27 days

Summary:

We all know that Github is great, but it runs the risk of some credentials being revealed by mistake. In this case I found a Rockset API key, This API key is not in the current code, but it is visible in an old commit.

Steps To Reproduce:

You can find the leak in this link : https://github.com/rockset/recipes/pull/19/files

        /* Getting the distance covered by each vehicle using the latest and oldest locations */
        distance_for_vehicles AS (
        SELECT
            ST_DISTANCE(
@@ -128,7 +147,7 @@
    'q4': query4 
}

api_key = "skZMJRZSXLZZj5HAdBjNxUfZbarWV5dLqfVO6U623zW5KROzfY0vNRa22ToZfRRe"

Then I visited the documentation of Rockset ( https://docs.rockset.com/rest-api/ ) and I found this way to check if the API key is revoke or not

curl --request GET \
    --url https://api.rs2.usw2.rockset.com/v1/orgs/self/users/self/apikeys \
    -H 'Authorization: ApiKey skZMJRZSXLZZj5HAdBjNxUfZbarWV5dLqfVO6U623zW5KROzfY0vNRa22ToZfRRe'

and I got this answer:

{"data":[{"created_at":"2019-10-22T06:08:37Z","name":"K1","key":"skZMJRZSXLZZj5HAdBjNxUfZbarWV5dLqfVO6U623zW5KROzfY0vNRa22ToZfRRe","last_access_time":null,"created_by":null}]}

So I could verify that it was not revoked

Impact

I just checked that the key was not revoked. I didn't try anything with the token to be prudent, and I don't know the real impact of this, But I think it is a good idea to share this with you, to avoid any risk that may grow.

Regards!

The original report as published on HackerOne, by fonte. 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

Impact

The API key was still active, so an attacker could potentially use it to access the Rockset account, though the reporter did not test the actual impact.

What the attacker needed

Public GitHub repository; API key committed in history

The fix

The API key should be revoked and removed from the repository history.

How it was found

  1. Find the leaked API key in an old commit of a public GitHub repository.
  2. Use the Rockset API documentation to find an endpoint that checks API key validity.
  3. Send a request to that endpoint with the leaked key and observe that it returns valid key details.

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.

An API key is like a password that lets a program access a service. Here, a key was left in an old version of a public code repository, and the reporter confirmed it was still active.

What is Leaked secrets?

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

More from Rockset

View all

The newest disclosed reports for this program.

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.