Microsoft `x-apikey` Exposed in Mozilla CI Public Logs
A Microsoft telemetry API key was exposed in publicly accessible Mozilla CI logs, where it appeared in HTTP POST requests captured by mitmproxy during automated Firefox testing. An attacker could obtain the key from the logs, though the text states its security impact is minimal because telemetry API keys have limited functionality.
Originally disclosed on HackerOne
- Fixed in 14 days
- Paid in 13 days
- Disclosed after 4 months
Summary by the program
A Microsoft telemetry API key (x-apikey) was found exposed in publicly accessible Mozilla CI logs. The key appears in HTTP POST requests sent to Microsoft's telemetry endpoint during automated Firefox testing and is captured via mitmproxy logs.
While the security impact is minimal (telemetry API keys with limited functionality) and the report is considered out of scope of our program, we took action to move mitmproxy.log artifacts to internal storage to prevent future credential leakage. Therefore, we accepted the report and paid a bonus as a recognition of the reporter's efforts.
What the report shows
The target is Mozilla's continuous integration (CI) infrastructure, specifically the logs produced while automated Firefox testing runs. During that testing, Firefox sends HTTP POST requests to Microsoft's telemetry endpoint, and those requests carry a Microsoft telemetry API key in an x-apikey header. The traffic is captured through mitmproxy, and the resulting mitmproxy.log artifacts were stored in a location that was publicly accessible.
The researcher, xhacking_z, found the key exposed in those public CI logs. The report does not describe the individual steps taken to locate the log, the URL of the log, or the exact request that was captured. What it does state is the mechanism: the key appears in the POST requests to the telemetry endpoint, and mitmproxy logging preserved those requests in a file that anyone could reach.
The program's own summary is candid about the assessment. It describes the security impact as minimal, because telemetry API keys have limited functionality. It also notes that the report was considered out of scope of the program. Despite that, Mozilla took action: mitmproxy.log artifacts were moved to internal storage so that future credential leakage of this kind would not happen. The report was accepted and a bonus of 200.00 USD was paid as recognition of the reporter's efforts. The platform records the severity as medium with a CVSS score of 5.3, under the weakness category Cleartext Storage of Sensitive Information.
Root cause
The likely root cause is that CI build artifacts containing captured HTTP traffic were published to a publicly reachable location without any filtering or redaction. mitmproxy writes full request and response data, including headers, to its log file. When a test run exercises code that authenticates to a third-party service, the credential travels in a header and lands in that log verbatim. Nothing in the pipeline stripped the x-apikey header before the artifact became public, so the secret was stored in cleartext in a publicly accessible location..
The report frames this as cleartext storage of sensitive information rather than as a flaw in the telemetry endpoint itself.
Impact
The report is explicit that the impact is minimal. A telemetry API key has limited functionality, so possession of it does not translate into broad access to Microsoft systems or to Mozilla's own infrastructure. The report describes the impact as minimal because telemetry API keys have limited functionality.
The program still treated the exposure as worth fixing, because a leaked credential in a public log is a durable problem: the log stays online, the key stays in it, and anyone who finds the file later can reuse it. The remediation moved the mitmproxy.log artifacts to internal storage.
How this kind of bug works
Secrets leak into build and test infrastructure because that infrastructure is designed to record everything. Proxy tools, verbose HTTP clients, debug loggers and test reporters all exist to help engineers reproduce failures, so they capture headers, query strings and bodies by default. CI systems then upload those logs and artifacts so that anyone with access to the build can read them. The combination, full-fidelity capture plus broad publication, turns a transient credential into a permanent public one.
The bug class is not about a flaw in the application being tested. It is about the boundary between the test environment and the public. Common variants include credentials in console output, tokens in URLs recorded by access logs, secrets in crash dumps, environment variables echoed by failing scripts, and captured traffic from proxy-based test harnesses. The defence is to treat CI output as untrusted data: redact known sensitive headers and parameters before publication, keep raw captures in private storage, and rotate any credential that has ever been written to a shared log.
How to test for it
- Identify targets that publish CI logs, build artifacts, test reports or coverage output. Look for public links to build systems, status badges that resolve to log pages, and repositories that commit generated reports.
- Enumerate the artifact types. Proxy captures, HAR files, verbose test output, container logs and crash reports are the highest-value candidates because they record full requests.
- Read the logs for authentication material:
Authorization,x-apikey,X-Auth-Token, cookie headers, signed URLs with query-string signatures, and any custom header whose name suggests a key. - Confirm the credential is live without causing harm. A single low-impact request to the service the key belongs to, or a read-only call that the key's scope permits, is enough to show validity. Do not enumerate data or change state.
- Record where the artifact lives, when it was published, and whether it is still reachable, so the program can reproduce the finding.
A positive result looks like a header value in a public log that the owning service accepts. Common false positives are placeholder values, keys already revoked, keys scoped to a sandbox with no real capability, and values that look like secrets but are public identifiers. Check the scope before reporting: a key with no meaningful permissions is a hygiene issue, and some programs will treat it as out of scope, as happened here.
How it is fixed
The standard fixes are layered. First, stop publishing raw captures: move proxy logs and similar artifacts to internal storage, which is the action this program took. Second, redact at capture time, configuring the proxy or logger to mask sensitive headers and query parameters before anything is written. Third, restrict artifact visibility so that only the people who need the build output can read it. Fourth, rotate any credential that has been exposed, since removing the file does not un-leak a key that may already have been copied. Fifth, add a scanning step in the pipeline that fails the build or alerts when a known secret pattern appears in an artifact destined for publication.
Hunting notes
This bug class hides in the seams between systems: test harnesses that record traffic, CI jobs that upload logs, and documentation or issue trackers where engineers paste debug output. Recon signals include public build dashboards, repositories containing .log or .har files, and projects whose tests call third-party APIs. When you find a candidate, show impact by proving the credential is accepted by the service it belongs to, describe the scope of what it can do, and point to the exact public location. If the capability is genuinely limited, say so plainly and frame the report around the exposure and the fix, because programs are more likely to accept a well-scoped hygiene finding than an inflated claim of compromise.
What happened, in plain words
Mozilla runs a lot of automated testing on Firefox. Every time a developer changes something in the browser, machines run tests to check that nothing broke. This is called continuous integration, or CI: a system that builds and tests software automatically, over and over, without a person doing it by hand.
During those tests, Firefox talks to Microsoft. It sends small pieces of information about how the browser is behaving to a Microsoft service called a telemetry endpoint. Telemetry is data a product collects about its own use, such as crash reports or performance figures. To be allowed in, Firefox has to identify itself with a key, much like a membership card that proves you belong to a club. That key travels inside the request in a header called x-apikey.
A request is simply a message a program sends to a server asking it to do something or give something back. A header is a small labelled line attached to that message, carrying extra details such as who is asking or what format they expect. The x-apikey header carries the key.
To see what Firefox was sending, the test setup used a tool called mitmproxy. Think of mitmproxy as a post office clerk who opens every letter, reads it, and writes down what it saw before passing it on. It records the full traffic into a file, here called mitmproxy.log. That file ended up somewhere anyone on the internet could reach.
The researcher, xhacking_z, found the key sitting in those public CI logs. The report does not describe how the log was located, its URL, or the exact captured request. What it does explain is the mechanism: the key appears in the POST requests to the telemetry endpoint, and the proxy log preserved those requests in a file that was open to the public. A POST request is one type of request, used when a program sends data to a server rather than just asking for a page.
Mozilla's own summary is honest about the size of the problem. It calls the security impact minimal, because telemetry API keys can only do a limited set of things. It also says the report was considered out of scope, meaning it fell outside the rules of what the bug bounty programme normally pays for. Even so, Mozilla acted: the mitmproxy.log files were moved to internal storage, so this kind of credential leak would not happen again. The report was accepted and a bonus of 200.00 USD was paid to recognise the reporter's effort. The platform records the severity as medium, with a CVSS score of 5.3, under the weakness category Cleartext Storage of Sensitive Information. CVSS is a standard scoring system for how serious a security issue is, and cleartext means stored in readable form, with no encryption protecting it.
Root cause
The likely cause is that build files containing recorded web traffic were published to a place anyone could reach, without anything filtering or blanking out the sensitive parts. mitmproxy writes full request and response data, headers included, into its log. When a test run uses code that logs in to another company's service, the credential travels in a header and lands in that log exactly as it was. Nothing in the pipeline removed the x-apikey header before the file became public, so the secret sat in readable form in a location reachable from the open internet.
The report frames this as cleartext storage of sensitive information, not as a flaw in Microsoft's telemetry endpoint. The mistake was in how the surrounding infrastructure handled the captured traffic.
Impact
The report is clear that the impact is minimal. A telemetry API key has limited functionality, so holding it does not give broad access to Microsoft systems or to Mozilla's own infrastructure. The report calls the impact minimal because telemetry API keys can only do a limited set of things.
The programme still treated the exposure as worth fixing, because a leaked credential in a public log is a lasting problem: the log stays online, the key stays inside it, and anyone who finds the file later can reuse it. The fix moved the mitmproxy.log files to internal storage.
In general, how this kind of bug works
Secrets leak into build and test systems because those systems are built to record everything. Proxy tools, chatty HTTP clients, debug loggers and test reporters all exist to help engineers work out why something failed, so they capture headers, query strings and message bodies by default. CI systems then upload those logs and files so that anyone with access to the build can read them. Full recording plus wide publication turns a short-lived credential into a permanent public one.
The bug class is not about a flaw in the application being tested. It is about the boundary between the test environment and the public. Common variants include credentials in console output, tokens in URLs recorded by access logs, secrets in crash dumps, environment variables printed by failing scripts, and captured traffic from proxy-based test setups. The defence is to treat CI output as untrusted data: blank out known sensitive headers and parameters before publication, keep raw captures in private storage, and replace any credential that has ever been written to a shared log.
How to test for it
- Find targets that publish CI logs, build files, test reports or coverage output. Look for public links to build systems, status badges that lead to log pages, and repositories that commit generated reports.
- List the kinds of file involved. Proxy captures, HAR files (a standard format for recording web traffic), verbose test output, container logs and crash reports are the best candidates because they record full requests.
- Read the logs looking for login material:
Authorization,x-apikey,X-Auth-Token, cookie headers, signed URLs with signatures in the query string, and any custom header whose name suggests a key. - Confirm the credential still works without causing harm. One low-impact request to the service the key belongs to, or a read-only call the key is allowed to make, is enough to show it is valid. Do not browse data or change anything.
- Note where the file lives, when it was published, and whether it is still reachable, so the programme can reproduce the finding.
A positive result looks like a header value in a public log that the owning service accepts. Common false alarms are placeholder values, keys already cancelled, keys limited to a sandbox with no real power, and values that look like secrets but are really public identifiers. Check the scope before reporting: a key with no meaningful permissions is a housekeeping issue, and some programmes will treat it as out of scope, as happened here.
How it is fixed
The standard fixes come in layers. First, stop publishing raw captures: move proxy logs and similar files to internal storage, which is what this programme did. Second, blank out secrets at capture time, setting the proxy or logger to mask sensitive headers and query parameters before anything is written. Third, restrict who can see build files, so only the people who need the output can read it. Fourth, replace any credential that has been exposed, since deleting the file does not un-leak a key that may already have been copied. Fifth, add a scanning step in the pipeline that fails the build or raises an alert when a known secret pattern appears in a file due to be published.
Hunting notes
This bug class hides in the gaps between systems: test setups that record traffic, CI jobs that upload logs, and documentation or issue trackers where engineers paste debug output. Signals to look for include public build dashboards, repositories containing .log or .har files, and projects whose tests call other companies' APIs. When you find a candidate, show impact by proving the credential is accepted by the service it belongs to, describe what it is allowed to do, and point to the exact public location. If the capability is genuinely limited, say so plainly and frame the report around the exposure and the fix, because programmes are more likely to accept a well-scoped housekeeping finding than an inflated claim of compromise.
Glossary
- CI (continuous integration): a system that automatically builds and tests software whenever code changes.
- Telemetry: data a product collects about its own use, such as crashes or performance figures.
- Endpoint: the address of a service that a program sends requests to.
- Request: a message a program sends to a server asking it to do something or return something.
- POST request: a request type used to send data to a server.
- Header: a small labelled line attached to a request or response carrying extra details.
x-apikey: the header in which the Microsoft telemetry key travelled.- API key: a secret string that identifies a program to a service, like a membership card.
- mitmproxy: a tool that sits between a program and a server, records the traffic, and can inspect it.
mitmproxy.log: the file mitmproxy writes its recorded traffic into.- Artifact: a file produced by a build or test run and kept for later use.
- Pipeline: the sequence of automated steps that build, test and publish software.
- Redaction: removing or masking sensitive parts of a file before it is shared.
- Cleartext: stored in readable form, with no encryption protecting it.
- Credential: any secret used to prove identity, such as a key, password or token.
- Token: a piece of data used in place of a password to prove identity.
- Cookie header: the header a browser uses to send stored session data back to a site.
- HAR file: a standard file format for recording web traffic.
- CVSS: a standard scoring system for the severity of a security issue.
- Out of scope: outside the rules of what a bug bounty programme accepts or pays for.
- Bug bounty programme: a scheme where organisations pay researchers for reporting security issues.
- Sandbox: an isolated environment with limited capabilities, used for safe testing.
- False positive: a finding that looks like a problem but is not one.