Skip to content
Leaked secrets Disclosed report Beginner

user api key leaked

An API key was exposed in an older URL discovered via URL enumeration, and it successfully authenticated requests to a restricted endpoint. An attacker with the key could access personal information or perform actions on the user's behalf.

caelus-sec Follow

Originally disclosed on HackerOne

Informational View original
  • Fixed in 2 hours
  • Disclosed after 26 days

While testing WakaTime using the tool gau (Get All URLs), I discovered an exposed API key in one of the older URLs. Upon testing this API key, I found that it successfully authenticated requests to an endpoint that would otherwise return "401 Unauthorized" without it. This indicates that the API key is valid and grants access to restricted resources, which could lead to information disclosure or potential misuse depending on the associated permissions.

Impact

An attacker who obtains the API key waka_edf47c40-cabf-46e7-9f88-f1b44f00431f could potentially access personal information about the user or perform unauthorized actions on their behalf via the API.

The original report as published on HackerOne, by caelus-sec. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 3 min read.

What the report shows

The target is WakaTime, tested on the wakatime.com asset. The researcher was looking for exposed URLs using gau (Get All URLs), a tool that pulls known URLs for a domain from public sources such as archives and crawl data. Among the older URLs returned, one contained an API key that had been left in place.

The researcher then tested the key against an endpoint that normally rejects unauthenticated callers with 401 Unauthorized. With the key supplied, the request authenticated successfully. That confirmed the key was live and carried some level of access to restricted resources.

The key itself is a WakaTime API key in the following form:

Text
waka_edf47c40-cabf-46e7-9f88-f1b44f00431f

The report does not name the URL where the key was found, the endpoint that was tested, the request format, or the permissions attached to the key. It also does not describe a fix, a bounty or a CVSS score; the platform records the severity as none with a CVSS of 0.0, and the report was disclosed on 13 May 2025.

Root cause

The key was found in one of the older URLs returned by gau, so it had been exposed in a place that gau could retrieve from public sources. The key was still valid: supplying it authenticated a request to the tested endpoint.

Impact

As the report puts it, an attacker holding the key could potentially access personal information about the user or perform unauthorised actions on their behalf through the API. The exact scope depends on the permissions associated with the key, which the report does not establish. The researcher frames the outcome as possible information disclosure or misuse.

How this kind of bug works

API keys are bearer credentials: whoever presents the string is treated as the owner. There is no second factor and no binding to a device or session. If the string leaks into anything a third party can read, the credential is effectively shared with the world until it is rotated.

Leaks happen through several common channels. Secrets get hard-coded into client-side JavaScript, committed to public repositories (including old commits and forks), pasted into tickets or documentation, embedded in URLs that are logged by proxies and analytics, or returned in error messages. Search engines, web archives and crawl datasets then copy those URLs, so a key that was removed from a live page can still be found in historical records.

  1. Enumerate historical and current URLs for the target with a URL collection tool, then filter the results for parameters and paths that suggest secrets: names containing key, token, api_key, access_token, secret, auth, or long random-looking values in query strings and fragments.
  2. Fetch archived copies of interesting pages and JavaScript files and search the bodies for key-like patterns, including vendor prefixes and UUID-shaped strings.
  3. For each candidate, identify an endpoint that returns 401 or 403 without credentials, then replay the request with the candidate as the credential, in the header or parameter the API documents.
  4. A positive result is a change from an unauthenticated rejection to a successful, authenticated response that returns data or performs an action. Confirm the key belongs to the target's API and not to an unrelated service.

Common false positives: placeholder or example keys in documentation, revoked keys that still appear in archives, keys for third-party services embedded legitimately in public client code (for example, publishable keys designed to be public), and keys that authenticate but only reach endpoints with no sensitive data. Always check whether the key is still valid and what it can actually reach before reporting.

Revoke and rotate the exposed key. Remove the secret from the live page, repository history and build artefacts, and purge caches where possible. Move the secret to server-side storage or a secrets manager, restrict the key's permissions to the minimum needed, and add detection for secrets in commits and deployments so the same mistake is caught before publication.

Leaked credentials hide in old URLs, archived snapshots, JavaScript bundles, source maps, public repositories and configuration files served by mistake. Recon signals include URL datasets with many historical paths, JavaScript files containing long random strings, and endpoints that behave differently when a candidate credential is supplied. To make a report land, show the unauthenticated baseline response next to the authenticated one, state what data or action the key unlocks, and avoid overstating impact beyond what you demonstrated.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 5 min read.

What happened, in plain words

It keeps that data in an account, and the account is reached through an API: a way for programs to talk to a website without a person clicking buttons. To prove who is asking, the API expects a key, a long string that works like a password for software.

The researcher was looking for forgotten corners of the wakatime.com website. They used a tool called gau (Get All URLs), which collects known addresses for a domain from public sources such as web archives and crawl data. Think of it as a search engine for old links: pages that no longer exist on the live site can still be listed in an archive, much like an old shop sign photographed years ago and kept in a library.

Among the older URLs gau returned, one contained an API key that had been left in place. The researcher then tried that key against an endpoint, a specific address on the API that performs one job. Without a key, that endpoint answers 401 Unauthorized, which is the server's way of saying "I do not know who you are, so no". With the key supplied, the request went through.

That is the whole finding: a secret that should have stayed private was found in an older URL, and it still worked. The report does not name the URL where the key was found, the endpoint that was tested, the request format, or the permissions attached to the key. It also does not describe a fix or a bounty. The platform records the severity as none with a CVSS of 0.0, and the report was disclosed on 13 May 2025.

The key itself is a WakaTime API key in the following form:

Text
waka_edf47c40-cabf-46e7-9f88-f1b44f00431f

Testing the key matters because a string that looks like a key may be a placeholder, an example, or a revoked credential; only a real request shows whether it is live.

In general, how this kind of bug works

API keys are bearer credentials. "Bearer" means the holder is trusted: whoever presents the string is treated as the account owner. There is no second check, no code sent to a phone, no link to a particular browser or session. It is like a coat-check ticket: the person holding the ticket gets the coat, whether or not they are the person who left it.

Leaks happen through a handful of common channels:

  1. Secrets hard-coded into JavaScript that browsers download, where anyone can read them.
  2. Secrets committed to public code repositories, including old commits and copies of the project.
  3. Secrets pasted into support tickets, documentation or chat.
  4. Secrets embedded in URLs, which then get logged by proxies and analytics tools.
  5. Secrets returned in error messages.

Search engines, web archives and crawl datasets copy those URLs, so a key removed from a live page can still be found in historical records.

  1. Collect historical and current URLs for the target with a URL collection tool, then filter for parameters and paths that suggest secrets: names containing key, token, api_key, access_token, secret, auth, or long random-looking values in query strings and fragments.
  2. Fetch archived copies of interesting pages and JavaScript files and search the bodies for key-like patterns, including vendor prefixes and UUID-shaped strings.
  3. For each candidate, find an endpoint that returns 401 or 403 without credentials, then replay the request with the candidate as the credential, in the header or parameter the API documents.
  4. A positive result is a change from an unauthenticated rejection to a successful, authenticated response that returns data or performs an action. Confirm the key belongs to the target's API and not to an unrelated service.

Common false positives: placeholder or example keys in documentation, revoked keys that still appear in archives, keys for third-party services embedded legitimately in public client code (for example, publishable keys designed to be public), and keys that authenticate but only reach endpoints with no sensitive data. Always check whether the key is still valid and what it can actually reach before reporting.

Revoke and rotate the exposed key. Remove the secret from the live page, repository history and build artefacts, and purge caches where possible. Move the secret to server-side storage or a secrets manager, restrict the key's permissions to the minimum needed, and add detection for secrets in commits and deployments so the same mistake is caught before publication.

Leaked credentials hide in old URLs, archived snapshots, JavaScript bundles, source maps, public repositories and configuration files served by mistake. Recon signals include URL datasets with many historical paths, JavaScript files containing long random strings, and endpoints that behave differently when a candidate credential is supplied. To make a report land, show the unauthenticated baseline response next to the authenticated one, state what data or action the key unlocks, and avoid overstating impact beyond what you demonstrated.

Glossary

  • API: a way for one program to talk to another over the internet, usually at fixed addresses called endpoints.
  • API key: a long string that identifies a program or user to an API, working like a password for software.
  • Asset: the specific system or domain a test targets, here wakatime.com.
  • Authentication: proving who you are to a system.
  • Bearer credential: a secret where possession alone grants access, with no further check.
  • CVSS: a standard scoring system for the severity of a security issue, from 0.0 to 10.0.
  • Endpoint: a specific address on an API that performs one job.
  • gau (Get All URLs): a tool that collects known URLs for a domain from public sources such as archives and crawl data.
  • Header: extra information sent alongside a web request, such as a credential.
  • Information disclosure: exposing data to someone who should not see it.
  • JavaScript bundle: a file of code that a website sends to the browser to make the page work.
  • Parameter: a named value attached to a URL, usually after a ?.
  • Query string: the part of a URL after the ? that carries parameters.
  • Recon: short for reconnaissance, the information-gathering phase of a security test.
  • Revoke: cancel a credential so it no longer works.
  • Rotate: replace a credential with a new one.
  • Scope / permissions: the limits on what a key is allowed to do.
  • Secret: any value that must stay private, such as a key, password or token.
  • Session: a logged-in period tied to a particular browser or device.
  • Source map: a file that maps compressed code back to its readable original, sometimes exposing source.
  • Token: a string used in place of a password to prove identity, often short-lived.
  • UUID: a standard format for a unique identifier, made of hexadecimal characters and hyphens.
  • 401 Unauthorized: the server's response meaning the request lacked valid identification.
  • 403 Forbidden: the server's response meaning the caller is identified but not allowed.
  • Web archive: a service that stores copies of web pages over time.

More from WakaTime

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.