AI Supply Chain Prompt Leaks Expose API Keys and Canaries

Research using 2 million canary prompts reveals widespread credential harvesting, front-door provider breaches, and ignored Zero Data Retention policies across the AI inference supply chain.

TL;DR

  • Empirical canary research by Dragos Chief Research Officer HD Moore deployed nearly 2 million prompts containing unique credentials, exposing systemic data interception across the AI inference ecosystem.
  • Three AI hosting providers suffered front-door breaches where attackers siphoned raw prompt payloads prior to model execution, capturing keys even on rejected HTTP requests and Zero Data Retention workloads.
  • Automated threat actors harvested AWS access keys from prompts, generating tens of thousands of API calls to probe S3, Secrets Manager, Bedrock inference models, and attempt IAM user creation.
  • Low-cost inference resellers and upstream model labs routinely log prompt text and execute automated scrapers, bypassing data privacy flags and cloning private Git repositories referenced in prompts.
  • Engineering teams must treat upstream AI routing layers as untrusted networks, enforcing client-side secret redaction and egress network controls rather than relying on contractual Zero Data Retention flags.

Enterprise integration of Large Language Model (LLM) APIs has created a complex web of intermediate AI routers, brokers, and multi-tenant inference hosts. As engineering teams pipe code context, database queries, and configuration files into these models, architectural blind spots across intermediate proxy nodes are triggering widespread ai supply chain prompt leaks. Empirical research conducted between July and October 2026 demonstrates that raw prompt payloads are routinely logged, scraped, and exploited by unauthorized third parties long before reaching intended model runtimes.

The study, executed by HD Moore, Chief Research Officer at Dragos, planted nearly 2 million digital tripwires across popular AI gateways and hosting networks. The results demonstrate that transport-layer security (TLS) guarantees fail when intermediate brokers terminate encryption to perform dynamic prompt routing. From front-door hosting compromises to deceptive reseller logging, secrets embedded within prompt strings—including AWS IAM keys, SSH credentials, and private Git URLs—are being siphoned at scale, according to reporting by Ars Technica.

For security architects and platform engineers, these findings invalidate the assumption that API payloads remain confidential between client and inference provider. This analysis deconstructs the multi-tiered AI routing pipeline, examines the operational failure of Zero Data Retention (ZDR) flags, evaluates real-world post-exploitation activity targeting harvested secrets, and establishes a defensive framework for securing production AI workflows.

The Unseen Hops: Architecture of the AI Inference Supply Chain

Modern AI architectures rarely connect an application directly to a bare-metal model server. Instead, requests traverse a multi-tier broker ecosystem designed to optimise latency, lower token costs, and provide fallback redundancy across multiple model providers. While this abstraction simplifies application code, it introduces multiple intermediate nodes that decrypt, inspect, and process plaintext prompt data.

When an application issues an API call to an aggregator or AI gateway (such as Vercel or OpenRouter), the request undergoes several processing stages before reaching an active inference engine such as vLLM, TensorRT-LLM, or Text Generation Inference (TGI):

+-------------------+
|  Client App /     |  1. HTTPS (Client TLS Termination)
|  Internal Gateway |
+---------+---------+
          |
          v
+-------------------+
|  AI Aggregator /  |  2. Decrypt Payload -> Parse System Prompts
|  Router           |     Determine Cost/Latency Target
+---------+---------+
          |
          v
+-------------------+
| Third-Party Broker|  3. HTTPS (Broker TLS Termination)
| / Reseller Proxy  |     Inject Provider Headers / Log Request Payload
+---------+---------+
          |
          v
+-------------------+
|  Front-Door API   |  4. HTTPS (Host TLS Termination)
|  Gateway (Host)   |     Auth Validation & Rate Limiting (Pre-Execution)
+---------+---------+
          |
          v
+-------------------+
|  Inference Engine |  5. Context Window Loading & Token Generation
|  (vLLM / TGI)     |
+-------------------+

At each step in this path, transport-layer encryption terminates. The intermediate proxy must parse the incoming JSON payload—specifically the messages array containing system and user prompts—to perform routing decisions, token counting, dynamic model matching, and billing allocation. Consequently, every broker, reseller, and reverse proxy along the request path holds plaintext copies of enterprise prompts in memory, and frequently writes them to disk for analytical or debugging logs.

This multi-tenant setup creates severe architectural opacity. An enterprise issuing a request to an AI router has no technical mechanism to verify the downstream path. The prompt may be forwarded to a tier-1 cloud vendor, passed to a low-cost inference reseller operating in a foreign jurisdiction, or load-balanced across a pool of unvetted micro-hosts. Data boundary guarantees dissolve at the first hop, leaving sensitive context exposed to whatever logging practices or security posture exist at downstream nodes.

Methodology of the Tripwire: How 2 Million Canaries Were Deployed

To measure data handling practices across the AI supply chain empirically, HD Moore designed a large-scale canary experiment. The objective was to track the lifecycle of secrets embedded in AI prompts and capture unauthorized access attempts across external infrastructure.

Between July and October 2026, researchers generated and transmitted nearly 2 million unique prompts to various AI providers, gateways, and resellers. Each prompt contained a single, isolated secret tied directly to attacker-monitored telemetry infrastructure. The canary credentials fell into five distinct categories:

  • AWS IAM Access Keys: Active key pairs (AKIA...) provisioned in empty, isolated AWS accounts with full AWS CloudTrail auditing enabled to record every API call attempt.
  • SSH Passwords: Unique credential pairs associated with monitored SSH honeypots.
  • Unique HTTP/HTTPS URLs: Dedicated, single-use URLs hosted on custom web servers designed to capture IP addresses, user-agent headers, and request timestamps.
  • Unique DNS Names: Dedicated subdomains configured under authoritative DNS servers logging all resolution attempts.
  • Private Git Repository References: Custom Git URIs hosted on isolated control servers to detect unauthorized automated repository cloning.

The experimental protocol enforced strict isolation: each secret appeared in exactly one prompt sent to a single provider path. If an AWS access key or unique URL registered activity, the architecture of the canary allowed researchers to trace the exact provider, proxy, or reseller responsible for the exposure.

The scale of the experiment provided statistical proof that prompt leakage is not an isolated edge case, but an active threat across intermediate hosting providers and reseller networks.

Front-Door Breaches: Siphoning Prompts Before Model Execution

The most severe vulnerability vector revealed by the research involves front-door breaches at third-party AI hosting providers. In these scenarios, external threat actors gained unauthorized access to the reverse proxies or API gateways that sit in front of LLM inference clusters.

Analysis of compromised host behavior demonstrated that attackers intercepted incoming HTTP POST requests before they were dispatched to underlying model execution runtimes. During late October 2026, hundreds of AWS canary keys sent to one compromised provider were siphoned in real time. Crucially, the captured payloads included requests that failed upstream authorization checks or rate limits and were rejected at the gateway layer without ever reaching an inference engine.

# Conceptual flow of front-door proxy interception:
# Incoming request reaches reverse proxy (e.g., NGINX / Envoy)
POST /v1/chat/completions HTTP/1.1
Host: api.provider-host.internal
Authorization: Bearer provider_token_123
Content-Type: application/json

{
  "model": "llama-3-70b-instruct",
  "messages": [
    {"role": "user", "content": "Deploy script using AWS_ACCESS_KEY_ID=AKIAEXAMPLECANARYKEY"}
  ]
}

# Malicious Lua/eBPF module or compromised proxy logging pipeline:
# 1. Inspect HTTP body -> 2. Regex match secrets -> 3. Exfiltrate to remote C2
# 4. Return 401 Unauthorized or forward to LLM (Interception occurs regardless of HTTP status)

This front-door interception capability indicates that compromise of host proxy infrastructure bypasses all model-level safeguards. Security parameters passed inside the request body are irrelevant when the proxy daemon itself is compromised.

The canary telemetry also revealed operational coordination between distinct provider breaches. Canary secrets transmitted to two separate compromised hosting providers were harvested and subsequently used in tandem from a single rented server within hours of submission. This co-ordinated credential usage confirms that a single threat actor had established persistence across multiple independent AI hosting platforms, actively harvesting credentials from incoming prompt streams.

Undisclosed Provider and Vulnerability Vectors

The research published by Dragos does not disclose the specific identities of the three compromised AI hosting providers, nor the identity or geographical attribution of the threat actor operating the rented server. Furthermore, the exact software vulnerabilities or entry vectors used by attackers to gain initial access to the front-door reverse proxies remain unconfirmed, and no formal CVE identifiers or public vendor postmortems have been linked to these specific host breaches to date.

The Reseller Trap: Low-Cost Brokers and Credential Harvesting

The economics of the AI inference marketplace have driven the emergence of low-cost resellers. These brokers operate as middle-tier proxies, purchasing bulk capacity from larger hosting providers or operating low-margin hardware clusters, then undercutting standard market pricing on AI aggregators.

To differentiate reseller harvesting from upstream provider logging, Moore implemented a differential testing methodology. Prompts containing unique canary secrets were directed to the exact same underlying open-source model via two different routing paths: one directly through established primary hosts, and another through discount resellers. When canary secrets surfaced only from requests routed through specific discount sellers, researchers isolated the middle-tier proxy as the source of exposure.

Reseller monetization models in these low-margin environments frequently rely on aggressive data logging. Middle-tier proxies deploy passive request logging frameworks that store raw prompt bodies in unencrypted log aggregators. Once recorded, automated log parsing scripts extract sensitive patterns (such as AWS keys, API tokens, and credentials) for secondary monetization or unauthorized access attempts.

Similar credential harvesting mechanics have affected other developer platforms, such as the Cursor Marketplace Breach, where exposed keys enabled malicious backdoor injection, and the Chainalysis Data Breach, where customer tokens and credentials were exposed via third-party integrations.

Integrating unvetted, low-cost reseller endpoints into enterprise API configurations creates an immediate vector for prompt credential harvesting. When application configurations dynamically route prompts to the lowest bidder, security posture drops to match the least secure proxy in the pool.

Illusion of Privacy: The Failure of Zero Data Retention Flags

Enterprise AI deployments often rely on technical flags and API parameters designed to enforce data privacy. Standards such as Zero Data Retention (ZDR) headers (e.g., X-Zero-Data-Retention: true) or JSON payload parameters (such as "data_collection": "off") are intended to instruct service providers not to store, log, or train on prompt payloads.

The canary experiment demonstrated that ZDR flags fail to prevent data exposure in multi-tier supply chains. ZDR is a contractual commitment implemented at the software policy level; it is not a cryptographic enforcement boundary. If an intermediate proxy is compromised, unvetted, or malicious, incoming HTTP request bodies are processed in plaintext regardless of payload flags.

Empirical evidence highlights systemic non-compliance across global infrastructure:

  • Overseas Web Scraping: A prominent Chinese AI research lab fetched secret URLs embedded within prompts sent to its models in over 50% of test requests conducted between July and October 2026.
  • Systemic ZDR Bypasses: Crucially, roughly two-thirds (66%) of the prompts sent to this lab that explicitly carried “no data collection” or ZDR flags still resulted in automated scrapers visiting the embedded secret URLs 2 to 3 days after the initial prompt was processed.
  • Jurisdictional Data Leakage: US enterprise applications that routed requests through domestic US brokers to reach this foreign lab’s models experienced identical web scraping and Git repository access attempts. The US proxy layer forwarded raw prompt data overseas, invalidating local data residency assumptions.
  • Long-Tail Persistence: One US hosting provider visited a secret canary URL more than two months after a single inference call was placed to its search endpoint. Another domestic proxy initiated automated web crawling days after prompt execution, irrespective of the upstream AI router used.
Provider Category Privacy Flag Standard Empirical Scraping Rate Observed Latency to Exposure
Chinese AI Research Lab ZDR / No Data Collection ~66% of flagged prompts scraped 2 to 3 days post-request
Chinese AI Research Lab Standard / Default Settings >50% of total prompts scraped 2 to 3 days post-request
US Reseller (Routing Overseas) Client-Specified US Only Identical to direct foreign lab routing 2 to 3 days post-request
US Hosting Provider (Search Endpoint) Default API Standard 100% of canary search test URLs >60 days post-request

Secondary Reconnaissance: Cloud Probing and Automated Git Scraping

The research illustrates that prompt leakage is immediately followed by automated threat actor reconnaissance. When credentials and resources leak through intermediate AI nodes, adversaries deploy automated tools to assess the access scope of harvested secrets.

For stolen AWS access keys, CloudTrail logs recorded tens of thousands of automated API requests emanating from adversary infrastructure shortly after prompt submission. The access patterns followed a systematic cloud post-exploitation sequence:

  1. Credential Validation: Executing sts:GetCallerIdentity to confirm key validity and extract the associated IAM ARN, account ID, and user name.
  2. Object Store & Secret Discovery: Issuing s3:ListAllMyBuckets, secretsmanager:ListSecrets, and ssm:GetParameters calls to identify stored database credentials, configuration files, and backup archives.
  3. Resource Exploitation & AI Model Hijacking: Invoking bedrock:ListFoundationModels and attempting to provision hosted inference instances within AWS Bedrock, seeking to hijack cloud compute for LLM tasks.
  4. Persistence & Privilege Escalation: Calling iam:CreateUser and iam:CreateAccessKey to provision secondary IAM accounts, attempting to maintain access if the original stolen key was revoked.
/* Sample AWS CloudTrail log entry illustrating automated post-leak recon */
{
  "eventVersion": "1.08",
  "eventTime": "2026-10-28T14:22:05Z",
  "eventSource": "secretsmanager.amazonaws.com",
  "eventName": "ListSecrets",
  "awsRegion": "us-east-1",
  "sourceIPAddress": "198.51.100.45",
  "userAgent": "boto3/1.28.9 Python/3.11.4 Linux/5.15.0-88-generic",
  "errorCode": "AccessDenied",
  "errorMessage": "User: arn:aws:iam::123456789012:user/canary-user is not authorized to perform: secretsmanager:ListSecrets",
  "userIdentity": {
    "type": "IAMUser",
    "principalId": "AIDAEXAMPLECANARYKEY",
    "arn": "arn:aws:iam::123456789012:user/canary-user",
    "accountId": "123456789012",
    "accessKeyId": "AKIAEXAMPLECANARYKEY"
  }
}

In parallel, secret URLs and private Git repository paths embedded within prompts were targeted by automated scrapers. Within days of prompt transmission to non-compliant hosting providers, automated Git clients hosted on third-party cloud infrastructure issued git clone commands against canary repository endpoints, attempting to retrieve code bases and commit histories.

Threat Model Realities: Direct Infrastructure vs. Multi-Tier AI Gateways

Evaluating the trade-offs between cost, latency, operational overhead, and data security requires analyzing the exposure surface of different AI integration architectures. Platform teams must select hosting models based on technical boundaries rather than legal assumptions.

Deployment Architecture Data Boundary Visibility TLS Termination Points Third-Party Risk Profile Primary Blast Radius
Self-Hosted / On-Premises
(vLLM / Ollama in Private Cloud)
Complete; data remains within internal VPC boundaries. Internal ingress controller only. Minimal; isolated to underlying infrastructure vendors. Internal network compromise or misconfigured VPC security groups.
Direct Tier-1 API
(Direct contract with primary provider)
High; direct point-to-point connection under audited SLA. Single external endpoint (Tier-1 API Gateway). Low to Moderate; governed by enterprise legal and security agreements. Tier-1 host breach or prompt injection causing data exfiltration.
Multi-Tier Gateway / Broker
(Dynamic routing, multi-reseller pools)
Opaque; prompt path dynamically selected per request. Multiple hops (Router -> Reseller -> Host Proxy -> Engine). Critical; vulnerable to front-door breaches and reseller credential harvesting. Systemic prompt siphoning, credential leakage, and unauthorized scraping.

While self-hosting open-weight models inside a private VPC provides the strongest cryptographic and network security boundaries, it imposes significant operational overhead and GPU hardware expenses. Conversely, multi-tier AI aggregators reduce costs through dynamic load balancing, but introduce substantial security risks by routing raw prompts through untrusted intermediate proxies.

Direct integration with primary tier-1 model providers represents a middle ground. By bypassing middle-tier brokers and dynamic reseller pools, engineering teams limit TLS termination to a single vendor endpoint operating under explicit, auditable security SLAs.

Hardening AI Pipelines: Defensive Strategies for Engineering Teams

Securing enterprise workflows against supply chain leaks requires moving security enforcement from upstream contracts to client-side application logic. Engineering teams must assume that any payload sent to an external API gateway can be logged, inspected, or intercepted.

1. Client-Side Pre-Processing and Secret Redaction

Applications must scan and sanitize prompt text before initiating API calls. Implementing an inline pre-processing proxy or SDK wrapper ensures that high-entropy tokens, AWS access keys, SSH strings, internal URLs, and connection strings are stripped or replaced with synthetic place-holders prior to transmission.

import re
import requests
from typing import Dict, Any

# Pattern library for client-side sanitisation
SECRET_PATTERNS = {
    "aws_access_key": r"(?:A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}",
    "private_key": r"-----BEGIN[ A-Z1-9_-]+PRIVATE KEY-----[\s\S]*?-----END[ A-Z1-9_-]+PRIVATE KEY-----",
    "generic_secret": r"(?i)(?:api_key|passthrough_token|password|secret)\s*[:=]\s*['\"]([^'\"]+)['\"]",
    "internal_url": r"https?://(?:[a-zA-Z0-9-]+\.)*internal\.example\.com[^\s]*"
}

def sanitize_prompt_text(text: str) -> str:
    """Replaces sensitive credential patterns with redacted placeholders."""
    sanitized = text
    for label, pattern in SECRET_PATTERNS.items():
        sanitized = re.sub(pattern, f"[REDACTED_{label.upper()}]", sanitized)
    return sanitized

def dispatch_secure_prompt(gateway_url: str, api_key: str, system_prompt: str, user_input: str) -> Dict[str, Any]:
    """Test in staging: Sanitizes prompt payloads before outbound HTTP transmission."""
    clean_system = sanitize_prompt_text(system_prompt)
    clean_user = sanitize_prompt_text(user_input)
    
    payload = {
        "model": "gpt-4o",
        "messages": [
            {"role": "system", "content": clean_system},
            {"role": "user", "content": clean_user}
        ]
    }
    
    headers = {
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json"
    }
    
    # Send sanitized payload over the wire
    response = requests.post(gateway_url, json=payload, headers=headers, timeout=30)
    response.raise_for_status()
    return response.json()

2. Restricting Gateway Routing and Pinning Upstream Endpoints

When using AI gateways such as LiteLLM or internal proxies, disable dynamic host routing to unvetted resellers. Explicitly restrict the destination target pool to approved primary providers with verified infrastructure SLAs.

# Example LiteLLM gateway configuration pinning explicit upstream endpoints
# Ensures requests bypass dynamic discount reseller pools
model_list:
  - model_name: enterprise-claude
    litellm_params:
      model: anthropic/claude-3-5-sonnet-20241022
      api_key: os.environ/ANTHROPIC_API_KEY
      # Explicitly route to official Tier-1 API, bypassing aggregators
      api_base: https://api.anthropic.com

  - model_name: enterprise-gpt4
    litellm_params:
      model: openai/gpt-4o
      api_key: os.environ/OPENAI_API_KEY
      api_base: https://api.openai.com/v1

general_settings:
  # Disable dynamic fallback to third-party discount resellers
  allow_requests_parent_fallback: false
  block_unverified_resellers: true

3. Deploying Internal Canary Tokens for Supply Chain Auditing

Security teams should embed synthetic, monitored canary credentials into automated test suites that periodically exercise AI pipelines. By monitoring AWS CloudTrail, DNS logs, and web webhooks for activity on these canary tokens, platform teams can detect prompt interception across external vendors in real time.

Production Sanitisation Recommendations

Integrate open-source secret scanning engines (such as Microsoft Presidio, Trufflehog, or custom Envoy WASM filters) directly into egress API gateways. Strip all sensitive data before payloads leave your cloud perimeter. Never trust upstream ZDR flags to protect raw secrets.

Common Mistakes in AI Gateway Operations

Deploying AI workloads into production without evaluating the underlying transport chain frequently leads to architectural anti-patterns:

  • Assuming End-to-End Encryption Applies to Prompts: Standard HTTPS secures data in transit between network hops, but does not prevent intermediate brokers from decrypting and reading payload bodies in memory.
  • Relying Exclusively on Contractual ZDR Flags: Treating Zero Data Retention headers as a technical boundary ignores the threat of front-door host compromises, reseller log harvesting, and out-of-band scraping.
  • Permitting Dynamic Reseller Routing to Minimize Token Costs: Enabling auto-routing settings on aggregators to select the cheapest available inference node exposes enterprise data to low-cost, unverified proxies operating without security controls.
  • Passing Unsanitized Application Logs and Context into System Prompts: Piping raw application stack traces, environment variables, or database dumps directly into user or system messages frequently introduces API keys, internal subdomains, and auth tokens into external prompt streams.

Key Takeaways for AI System Architects and Security Leaders

  • Treat the AI Inference Supply Chain as an Untrusted Network: Intermediate brokers, resellers, and reverse proxies decrypt and process prompt payloads in plaintext. Assume all data sent through multi-tier aggregators is logged.
  • Zero Data Retention is a Legal SLA, Not a Security Control: ZDR parameters provide zero protection against breached host infrastructure, proxy logging, or automated server-side web scraping.
  • Client-Side Sanitisation is Mandatory: Implement regex scanning, AST parsing, and secret redaction engines inside application boundaries before prompts are dispatched over the network.
  • Bypass Dynamic Reseller Pools: Avoid default cost-optimised routing algorithms on AI gateways. Pin upstream model endpoints to vetted primary hosts operating under verified enterprise contracts.
  • Monitor Cloud APIs for Prompt-Sourced Credentials: Establish real-time AWS CloudTrail and SIEM alert rules to detect automated access attempts targeting canary tokens or internal credential formats.

Frequently asked questions

How do canary tokens detect prompt leakage in AI supply chains?

Canary tokens are unique, trackable secrets—such as AWS access keys, SSH credentials, or private URLs—embedded into prompts sent through AI pathways. Because these secrets exist nowhere else, any attempt to resolve the DNS name, access the URL, or issue API calls with the key immediately signals that an intermediate proxy, reseller, or breached host siphoned and exposed the prompt data.

Why don’t Zero Data Retention (ZDR) flags prevent data theft during provider breaches?

Zero Data Retention is a policy agreement implemented in application code, not a cryptographic control. When a hosting provider’s front-door proxy or API gateway is compromised, attackers capture incoming HTTP payloads before model execution or policy enforcement occurs. The adversary intercepts raw prompt text in memory regardless of whether ZDR headers or privacy parameters are set in the payload.

How can engineering teams prevent accidental API key leaks in LLM prompts?

Engineering teams must implement mandatory client-side pre-processing prior to outbound prompt transmission. Using sanitisation libraries, secret scanning tools, or API gateway plugins, applications can match entropy patterns and key signatures (such as AWS keys, JWTs, or SSH strings) and replace them with synthetic placeholders before requests cross the organizational network boundary.

What are the main security risks of using low-cost AI inference resellers?

Low-cost inference resellers frequently operate on thin margins and may monetize incoming traffic by turning on full request logging. Intermediate proxy nodes can harvest embedded secrets, perform passive prompt scraping, or route requests to unverified offshore infrastructure, completely invalidating corporate data residency, compliance, and confidentiality requirements.

Sources and further reading

This article was drafted with AI assistance from the publicly cited sources and passed automated checks for structure and sourcing. Verify critical details against the vendor advisories linked above before acting.