Hello, I'm an AI assistant from Vercel. If we find something I can't solve, I'll help create a support case for you.
Hello Vercel Support,
I am investigating what appears to be unauthorized usage of an Anthropic API key that was stored in my Vercel project.
Relevant details: I created a new Anthropic API key and added it only to the Production environment variables of a single Vercel project (Tabum). I am the only member of the Vercel account/team. The key was never committed to Git, shared, or added to any other project, service, or environment. The application code uses only the model claude-haiku-4-5-20251001. After the key was added to Vercel, Anthropic usage logs began showing requests using multiple models that my application does not call, including Sonnet, Opus, Fable, and large streaming requests. My codebase contains no references to those models and no code paths that would select them. I have since rotated credentials, enabled a passkey, logged out sessions, and reviewed project access.
Could you please review any available audit logs and help determine: Whether there were any unexpected logins, sessions, or account access events. Whether the environment variable may have been accessed, revealed, or used outside of normal deployment execution. Whether there is any project activity, deployment activity, or platform-level information that could help identify how the key may have been exposed or used.
I can provide timestamps, request IDs, screenshots, and additional details if needed.
Thank you for your assistance.
hello
?
I understand how concerning it is to discover unexpected usage on your API credentials. To help you investigate, I have reviewed the available platform audit logs for your account and the tabum project.
Our audit records show no unexpected logins, sessions, or unauthorized account access. Every single action on your account and project was initiated by your primary user identity (jayhilwig@gmail.com).
Here are the specific audit log events regarding your ANTHROPIC_API_KEY for today (June 10, 2026):
- Environment Variable Viewed: At 17:23:48 UTC, the environment variable was decrypted and viewed in the Vercel Dashboard by your user account.
- Environment Variable Deleted: At 17:46:29 UTC, the variable was deleted from the project.
- Environment Variable Re-added: At 17:59:46 UTC, the variable was added back to the project for the Production and Preview environments.
- Production Deployment: At 17:59:56 UTC (10 seconds later), a new production deployment was triggered, which successfully built and injected the new environment variable value.
There are no other read, edit, or view events for this environment variable recorded by any other user or system process.
Given that there are no signs of platform-level compromise or dashboard access by third parties, there are two primary vectors through which these unexpected model calls might be occurring:
- Vector A: Dynamic Model Routing via an Unauthenticated API Route: If your application has a public API endpoint (such as
/api/chat or /api/generate) that routes requests to Anthropic, check if your code dynamically reads the model parameter from the incoming request body (e.g., model = req.body.model || 'claude-haiku-4-5-20251001'). If the endpoint has no authentication or rate limiting, an attacker could scan and find your API endpoint and send custom payloads specifying expensive models like Sonnet or Opus. In this scenario, your API key never leaves Vercel, but attackers abuse your serverless function to make the calls.
- Vector B: Client-side Exposure or Build Bundling: Ensure that the API key is never referenced or imported in a client-side component or file that gets compiled into the browser bundle. Even without the
NEXT_PUBLIC_ prefix, statically referencing server-side process variables in client-side files can sometimes cause bundlers to inline the value into the public JavaScript files.
- Vector C: Repository and Local History: Even if the key is not currently in your active codebase, check if it was ever accidentally committed in a previous Git commit or alternative branch. Automated crawlers constantly scan public and private repositories for credentials. Also, verify that any local
.env files were fully ignored and never committed to your repository's history.
To help you investigate this further at the platform and runtime level, I have prepared a support case for you. The case form is visible below this message. You can submit it to have our engineering and security teams review your serverless function execution logs and investigate the request patterns.