Api data leak
Historical snapshots of Planet's API endpoints archived by the Wayback Machine exposed API keys in URLs, and some of those keys were still valid. An attacker could use a valid key to make authenticated requests to the API.
- Triaged in 10 days
- Fixed in 2.3 years
- Disclosed after 2.3 years
Summary by the program
A security vulnerability has been identified where sensitive API keys are exposed through archived data accessible via the Wayback Machine (web.archive.org). Some of these API keys are found to be valid and could potentially be exploited by malicious actors. The exposure occurs through historical snapshots of Planet's API endpoints that were cached by the Internet Archive's crawling service.
Steps To Reproduce:
- https://web.archive.org/web/*/https://api.planet.com/* * check this url https://api.planet.com/basemaps/v1/mosaics?api_key=afdb1e8a9c8142739553e3942283d6c8&_page_size=1000 and this https://api.planet.com/basemaps/v1/mosaics/wmts?service=wmts&request=GetCapabilities&format=text%2Fxml&api_key=8fe044edc78c46ba904bb62e550493a3 * can see vaild api kay * this not vaild https://api.planet.com/basemaps/v1/mosaics?api_key=f366791cb438466fb9e3e492e721da8d&_page_size=1000
Impact It can be used to offend
Context
Planet Labs exposes a public API under api.planet.com, and one of its features is the basemaps service. The basemaps endpoints let a caller list mosaics and fetch WMTS capabilities, and they accept an api_key query parameter for authentication. Because the key travels in the URL, it can end up in places that record URLs: crawlers, caches and web archives.
The report is about exactly that. Sensitive API keys were found in archived snapshots of Planet's API endpoints that had been cached by the Internet Archive's crawling service and made reachable through the Wayback Machine at web.archive.org. Some of the keys recovered this way were still valid.
Setup
No account, role or special tooling is described. The whole exercise runs from a browser against the public Wayback Machine and the public Planet API. The only precondition is that the Internet Archive has crawled the relevant API URLs at some point, and the report's steps show that it had.
Finding it
The starting point is the Wayback Machine's URL index for the API host. Historical snapshots of Planet API endpoints were cached by the Internet Archive's crawling service, and because the API accepts its key as a query parameter, those snapshots contain the keys that were in use at crawl time.
Exploitation
Step 1: List archived API URLs
https://web.archive.org/web/*/https://api.planet.com/*
This is the Wayback Machine's wildcard listing for everything it has archived under https://api.planet.com/. It returns the set of captured URLs, which is where the API calls carrying keys show up.
Step 2: Open the archived basemaps calls
Two captured URLs are checked:
https://api.planet.com/basemaps/v1/mosaics?[redacted]&_page_size=1000
https://api.planet.com/basemaps/v1/mosaics/wmts?service=wmts&request=GetCapabilities&format=text%2Fxml&[redacted]
The first lists mosaics with a page size of 1000. The second requests WMTS capabilities as XML. In both, the api_key parameter is the credential of interest.
Step 3: Confirm the keys are valid
The researcher reports that these two keys are valid. A third archived URL is checked and its key is not valid:
https://api.planet.com/basemaps/v1/mosaics?[redacted]&_page_size=1000
So the archive contains a mix of live and dead credentials, and validity has to be checked per key rather than assumed.
Root cause
API keys are passed in the query string of basemaps requests. URLs, including their query strings, are what crawlers and archives store, so any crawl of those endpoints captures the key alongside the request. The archive then serves those URLs back to anyone who looks. The report does not describe any server-side control that should have prevented the keys from appearing in archived URLs; the exposure follows from putting a long-lived credential in a place that gets recorded.
Impact
The report states the exposure plainly: some of the archived keys are valid and could potentially be exploited by malicious actors. Its own impact line is simply that it can be used to offend. The report does not enumerate which data or actions a valid key unlocks, so the practical reach of a recovered key is not spelled out beyond access to the basemaps endpoints it was used with.
Fix
The report does not say what was changed. The structural fix is to stop putting API keys in URLs that can be crawled and archived, for example by moving the credential out of the query string, and to rotate any key that has appeared in an archived snapshot. Which of these the program actually did is not stated.
Variants to test
- Search the Wayback Machine for other hosts and paths that take credentials as query parameters, for example
https://web.archive.org/web/*/https://target.example/*?*key=*. A positive result is an archived URL whose key still authenticates against the live service. - Check archived API documentation, SDK examples and support pages, which often embed working keys in sample requests.
- Look at archived JavaScript bundles for keys that were later removed from the live site.
- Try the same wildcard listing against other subdomains of the target, since a single crawl of an authenticated endpoint is enough to leak the key.
Hunting notes
This class of bug hides wherever credentials travel in URLs: public APIs that accept api_key, token or similar parameters, and any endpoint a crawler can reach without authentication. During recon, the signal is a query string containing a key on a host that is publicly crawlable. The researcher showed impact by pointing to keys in archived snapshots that are still valid, while also showing that not every archived key is live, which makes the validity check the deciding step.
Difficulty: beginner. The technique needs no tooling beyond a browser and the public Wayback Machine, and the report's own steps are a wildcard archive search followed by replaying the captured URLs.
What happened, in plain words
Planet Labs runs a service called basemaps, part of its public API at api.planet.com. An API is a way for one piece of software to talk to another over the internet: instead of a page designed for a human to look at, the server answers with raw data. To use it, a caller has to prove who it is, and this API does that with an api_key value sent along in the web address itself.
That last detail is the whole problem. Web addresses get written down in many places: search engine crawlers, caches, and web archives. The Internet Archive is a non-profit that keeps copies of web pages and makes them viewable through a service called the Wayback Machine at web.archive.org. If the archive ever crawled a Planet API address that had a key in it, the archive now stores that key and shows it to anyone who asks.
That is what the researcher found. Archived snapshots of Planet's API endpoints, cached by the Internet Archive's crawling service, contained sensitive API keys. Some of those keys were still valid, meaning they still worked against the live API. The report's own impact line is short: it can be used to offend.
A useful comparison: an API key is like a spare key left under the doormat. It works, it is easy to use, and anyone who finds it can get in. Putting it in a web address is like writing the location of the doormat on a postcard and leaving the postcard in a public library, because addresses are copied and stored by many systems.
Context
Planet Labs exposes a public API under api.planet.com, and one of its features is the basemaps service. The basemaps endpoints let a caller list mosaics and fetch WMTS capabilities, and they accept an api_key query parameter for authentication. A query parameter is the part of a web address after the question mark, made of name and value pairs, for example `?[redacted] Because the key travels in the URL, it can end up in places that record URLs: crawlers, caches and web archives.
A crawler is a program that visits web addresses automatically and stores what it finds, the way a librarian might photocopy every page in a building. A cache is a stored copy kept to answer future requests faster. A web archive is a long-term collection of such copies.
The report is about exactly that. Sensitive API keys were found in archived snapshots of Planet's API endpoints that had been cached by the Internet Archive's crawling service and made reachable through the Wayback Machine at web.archive.org. Some of the keys recovered this way were still valid.
Setup
No account, role or special tooling is described. The whole exercise runs from a browser against the public Wayback Machine and the public Planet API. The only precondition is that the Internet Archive has crawled the relevant API URLs at some point, and the report's steps show that it had.
In other words, you do not need to install anything or sign up anywhere. You need a browser and an internet connection, and you need the archive to already hold a copy of the address you are interested in.
Finding it
The starting point is the Wayback Machine's URL index for the API host. Historical snapshots of Planet API endpoints were cached by the Internet Archive's crawling service, and because the API accepts its key as a query parameter, those snapshots contain the keys that were in use at crawl time.
Think of the index as the catalogue of a library of old web pages: it does not show you the pages yet, it shows you which pages exist in the collection. Searching that catalogue for a host name tells you every address under that host the archive has ever captured.
Exploitation
Step 1: List archived API URLs
https://web.archive.org/web/*/https://api.planet.com/*
Line by line:
https://web.archive.org/is the Wayback Machine's own address. Everything after it is a request to the archive, not to Planet./web/selects the part of the archive that lists captures over time.*is a wildcard, meaning "anything here".https://api.planet.com/*is the pattern being searched for: any address that starts with the Planet API host and continues with anything at all.
So the whole line asks the archive: show me every address you have ever stored that begins with https://api.planet.com/. The result is the set of captured URLs, which is where the API calls carrying keys show up. This step is taken first because you cannot guess which old addresses exist; the archive knows, and it will tell you.
Step 2: Open the archived basemaps calls
Two captured URLs are checked:
https://api.planet.com/basemaps/v1/mosaics?[redacted]&_page_size=1000
https://api.planet.com/basemaps/v1/mosaics/wmts?service=wmts&request=GetCapabilities&format=text%2Fxml&[redacted]
Line by line for the first address:
https://api.planet.com/is the API host./basemaps/v1/mosaicsis the path, the part that names which feature you want. Here it is the basemaps service, version 1, and the list of mosaics. A mosaic in this context is a combined image assembled from many smaller images.?starts the query string, the list of parameters.[redacted] is the credential: the nameapi_key` and its value. This is the secret of interest.&separates one parameter from the next._page_size=1000asks for up to 1000 results in one page, instead of the default smaller number.
Line by line for the second address:
- The path
/basemaps/v1/mosaics/wmtspoints at the WMTS part of the service. WMTS is a standard way of serving map tiles, the small square images that make up a zoomable map. service=wmtsnames the service being asked for.request=GetCapabilitiesasks the server to describe what it can do, a kind of menu of available layers and formats.format=text%2Fxmlasks for the answer as XML, a text format for structured data.%2Fis how a slash is written inside a URL, so this decodes totext/xml.- `[redacted] is the second credential.
In both, the api_key parameter is the credential of interest. These two addresses are the archived calls that carry keys.
Step 3: Confirm the keys are valid
The researcher reports that these two keys are valid. A third archived URL is checked and its key is not valid:
https://api.planet.com/basemaps/v1/mosaics?[redacted]&_page_size=1000
This address has the same shape as the first one: the mosaics list, a page size of 1000, and an api_key value. The difference is the outcome. The key here does not work.
So the archive contains a mix of live and dead credentials, and validity has to be checked per key rather than assumed. A dead key is like finding an old door key in a drawer: it looks like a key, but the lock has been changed. This is why the third check matters. Without it, you would not know whether the archive is full of working secrets or just old rubbish, and the finding would be much weaker.
Root cause
API keys are passed in the query string of basemaps requests. URLs, including their query strings, are what crawlers and archives store, so any crawl of those endpoints captures the key alongside the request. The archive then serves those URLs back to anyone who looks. The report does not describe any server-side control that should have prevented the keys from appearing in archived URLs; the exposure follows from putting a long-lived credential in a place that gets recorded.
A long-lived credential is one that stays valid for a long time, unlike a short session that expires in minutes. The longer it lives, the more useful it is to whoever finds it, and the more damage it can do before anyone notices.
Impact
The report states the exposure plainly: some of the archived keys are valid and could potentially be exploited by malicious actors. Its own impact line is simply that it can be used to offend. The report does not enumerate which data or actions a valid key unlocks, so the practical reach of a recovered key is not spelled out beyond access to the basemaps endpoints it was used with.
In plain terms: someone with a working key can make the same requests the key was made for. What else that key might open is not described in the report.
Fix
The structural fix is to stop putting API keys in URLs that can be crawled and archived, for example by moving the credential out of the query string, and to rotate any key that has appeared in an archived snapshot. Rotating a key means replacing it with a new one and switching off the old one, so that copies of the old key stop working. Which of these the program actually did is not stated.
Variants to test
- Search the Wayback Machine for other hosts and paths that take credentials as query parameters, for example
https://web.archive.org/web/*/https://target.example/*?*key=*. A positive result is an archived URL whose key still authenticates against the live service. The pattern here adds?*key=*, which narrows the search to addresses that contain a parameter whose name ends inkey. - Check archived API documentation, SDK examples and support pages, which often embed working keys in sample requests. Documentation writers sometimes paste a real key into an example and forget to replace it.
- Look at archived JavaScript bundles for keys that were later removed from the live site. A JavaScript bundle is the file of program code a website sends to your browser; old copies of it may still contain secrets that have since been cleaned up.
- Try the same wildcard listing against other subdomains of the target, since a single crawl of an authenticated endpoint is enough to leak the key. A subdomain is a host like
maps.example.comunder the mainexample.com.
Hunting notes
This class of bug hides wherever credentials travel in URLs: public APIs that accept api_key, token or similar parameters, and any endpoint a crawler can reach without authentication. During recon, the signal is a query string containing a key on a host that is publicly crawlable. Recon here means the early looking-around phase, before any attempt to break anything.
The researcher showed impact by pointing to keys in archived snapshots that are still valid, while also showing that not every archived key is live, which makes the validity check the deciding step.
Difficulty: beginner. The technique needs no tooling beyond a browser and the public Wayback Machine, and the report's own steps are a wildcard archive search followed by replaying the captured URLs. Replaying means simply opening the old address again and seeing whether the server still accepts it.
Glossary
- API: a way for software to talk to another service over the internet, returning raw data rather than a page made for people to read.
- API key: a secret value that identifies and authorises a caller of an API, like a spare key kept for a door.
- Authentication: proving who you are to a service, usually by presenting a credential such as a key.
- Authorise: deciding what a proven identity is allowed to do.
- Basemaps: the Planet service described in the report, which serves mosaics and WMTS capabilities.
- Cache: a stored copy of a response kept so future requests can be answered faster.
- Crawler: a program that visits web addresses automatically and records what it finds.
- Credential: any secret used to prove identity, such as a key or a password.
- Endpoint: a specific address on a server that performs a specific function.
- Host: the part of a web address naming the server, for example
api.planet.com. - Internet Archive: a non-profit that keeps long-term copies of web content.
- JavaScript bundle: the file of program code a website sends to the browser.
- Long-lived credential: a secret that stays valid for a long time rather than expiring quickly.
- Mosaic: a combined image assembled from many smaller images.
- Path: the part of a web address after the host that names the feature, for example
/basemaps/v1/mosaics. - Query parameter: a name and value pair after the
?in a web address, separated from others by&. - Query string: everything after the
?in a web address, made of query parameters. - Recon: the early phase of looking around a target to learn what exists.
- Replay: opening a recorded request again to see whether it still works.
- Rotate: replace a secret with a new one and switch off the old one.
- Snapshot: a stored copy of a web address as it was at a particular moment.
- Subdomain: a host that sits under a main domain, such as
maps.example.comunderexample.com. - URL: a web address.
- Validity check: testing whether a found credential still works against the live service.
- Wayback Machine: the Internet Archive's service for viewing stored copies of web addresses.
- Wildcard: a symbol such as
*that stands for "anything here". - WMTS: a standard for serving map tiles, the small square images that make up a zoomable map.
- XML: a text format for structured data.