Keys on Doormats: Exposed API Credentials on the Web

Nurullah Demir, Yash Vekaria, Georgios Smaragdakis, Zakir DurumericarXiv 2026 · DOI

TL;DR

This paper reveals that API credentials are alarmingly prevalent on the public web, often exposed through dynamic JavaScript and third-party inclusions rather than static code. The authors demonstrate that these exposures persist for extended periods and can have severe real-world consequences, but also show that responsible disclosure can significantly reduce their prevalence.

What Problem Does This Paper Address?

Application Programming Interfaces (APIs) are fundamental to modern software, enabling seamless integration between services. However, they rely on sensitive credentials like API keys for authentication. The secure handling of these keys is paramount, as their exposure can grant attackers access to critical systems and data. While previous research has focused on credential exposure in code repositories like GitHub or cloud storage, the vast and dynamic landscape of the public web has remained largely unexplored. This paper aims to fill that gap by systematically investigating how API credentials are exposed on websites, understanding the root causes, and assessing the impact and persistence of these vulnerabilities.

Methods

The researchers employed a multi-stage methodology:

  1. Data Collection: They leveraged HTTP Archive's dataset, which captures web performance and network data for millions of websites, specifically focusing on landing pages from the September 2025 crawl. This provided approximately 200 TB of data.
  2. Credential Identification: They used TruffleHog, an open-source secret detection tool, to scan the collected HAR (HTTP Archive) files. TruffleHog can identify over 800 distinct secret types.
  3. Exposure Localization: A pipeline was developed to pinpoint where credentials appear within web resources (request URLs, response bodies, JavaScript, etc.) by analyzing HAR files.
  4. Credential Validation: To combat the high false-positive rate of automated detection, they implemented a validation component that uses service-specific, non-destructive API calls to confirm if detected credentials are active. They focused on high-impact services like AWS, Cloudflare, Stripe, and GitHub.
  5. Longitudinal Analysis: Historical web data from HTTP Archive was used to track the persistence of exposed credentials over time, estimating exposure duration.
  6. Responsible Disclosure: A systematic approach was used to notify affected parties via email, including security.txt files and generic email addresses. They tracked remediation efforts (removal and revocation) through daily crawls.
  7. Root Cause Analysis: Feedback from disclosure recipients was analyzed to identify the underlying causes of credential exposure.

Datasets

  • HTTP Archive Dataset: Used for collecting web performance and network data from millions of websites.
  • Chrome User Experience Report (CrUX): Used for understanding website popularity and geographic distribution.
  • Tranco Toplist: Used to rank website popularity.
  • Cisco Umbrella: Used for domain categorization.

No new benchmarks were introduced, but the study analyzed a massive dataset of real-world web content.

Key Insights and Ideas

  • Dynamic Exposure is King: The vast majority of credential exposures (84%) occur within JavaScript resources, particularly in bundled files, and are introduced during build and deployment processes, not in static code. This highlights the inadequacy of traditional static analysis for web security.
  • Third-Party Supply Chain Risks: While first-party exposures are common, third-party resources (like scripts from Google Tag Manager or Cloudflare) are significant vectors, sometimes due to the third-party itself (e.g., a single reused script) and often due to first-party misconfigurations.
  • Persistence is a Major Problem: Exposed credentials remain publicly accessible for an average of 12 months, with some persisting for years, indicating a severe, long-term security risk.
  • Responsible Disclosure Works: Their large-scale disclosure effort led to a ~50% reduction in exposed credentials within 14 days, demonstrating the effectiveness of coordinated reporting.
  • Root Causes are Diverse: Exposures stem from a mix of technical issues (JS bundling errors, misconfigured environment variables) and human factors (developer oversight, testing leftovers, misconceptions about "safe" keys).

Key Results

  • 1,748 Verified Credentials: Identified across nearly 10,000 webpages from 14 service providers.
  • 84% in JavaScript: The dominant file type for exposures.
  • 62% in Bundled JS: A significant portion of JS exposures are within bundled files.
  • Average Persistence: 12 Months: Exposed credentials remain accessible for a substantial period.
  • 50% Reduction Post-Disclosure: Within 14 days of responsible disclosure, exposed credentials dropped by half.
  • Top Services Affected: AWS, Stripe, Telegram, and OpenAI were among the most frequently exposed.
  • Geographic Concentration: The US and India showed a disproportionately high share of exposed domains.

Limitations and Future Work

  • Tool Limitations: The study relied on TruffleHog, which may not capture all credential types, especially those in unsupported encoded or encrypted formats.
  • Disclosure Reach: While extensive, their disclosure process may not have reached all affected organizations.
  • "Safe-to-Expose" Misconceptions: The study found that even ostensibly "safe" public or read-only keys could lead to significant risks when misused or when their scope was later extended.
  • Future Work: The authors suggest further investigation into the specific revocation workflows and policies of different services, as well as deeper analysis into the causes of varying exposure lifetimes. They also call for proactive measures from service providers to mitigate these risks.

Summary updated

BibTeX
@misc{demir2026keys,
  author = {Nurullah Demir and Yash Vekaria and Georgios Smaragdakis and Zakir Durumeric},
  title = {{Keys on Doormats: Exposed API Credentials on the Web}},
  year = {2026},
  eprint = {2603.12498},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2603.12498},
}

Loading related content...

Figure