Go back

Attackers Exploit CVEs to Harvest Credentials

Patrick Garrity

Patrick Garrity

in/patrickmgarrity/

Key takeaways:

  • Credential-harvesting attempts appeared across 127 of 694 CVEs observed in VulnCheck Canaries (18%), with monthly records rising roughly sixfold from July to October.
  • Open source software, AI products and developer tools accounted for 61% of the CVEs associated with credential-harvesting attempts.
  • Attackers search application files, logs and environment variables for database passwords, cloud credentials and API keys, with file-read and SSRF vulnerabilities providing opportunities without code execution.
  • VulnCheck observed 1,756 attempts targeting AI provider and coding agent credentials from 406 IP addresses across 27 CVEs.
  • Medium-severity vulnerabilities represented just 6% of the CVEs associated with harvesting attempts but generated 23% of harvesting records.
  • Defenders should prioritize vulnerabilities that expose secrets, restrict access to credential files and cloud metadata, and routinely rotate and monitor application, cloud and AI credentials.

For a few months, a lot of my research has focused on the exploitation tactics attackers use across VulnCheck Canaries. When I researched Langflow, I noticed it was being targeted in credential harvesting operations. A few weeks ago, Microsoft published research about attackers grabbing keys from GitHub, and the IOCs from that report showed up in attacks on our Canaries, which also showed credential harvesting. So naturally, I thought it would be interesting to explore just how broad credential harvesting is across VulnCheck Canaries, which technologies are being targeted, and what types of keys threat actors are going after.

How Broad Is Credential Harvesting Through Vulnerability Exploitation?

Of the 694 CVEs tagged in VulnCheck Canaries, 127 (18%) have at least one credential-harvesting request.That's roughly 1 in 5 CVEs in the Canary data being used to harvest credentials.

Sixty nine CVEs were seen from five or more source IPs, 40 from 20 or more, and 20 from 100 or more, highlighting the magnitude of credential harvesting. Credential harvesting makes up 13.0% of all Canary exploitation records from January to November 2026, and most of the targeted vulnerabilities 57% have CVE IDs published in 2025 or 2026.

Credential-harvesting volume grew about six-fold from July to October 2026, from roughly 17K to 99K records. Most of that growth came from two bugs. Scanners first ramped up on the Vite file-read bug (CVE-2025-30208) in August and September, then shifted to the Next.js middleware bypass (CVE-2025-29927), which alone accounted for 68K of October's 99K harvesting records. The September peak share (34.5%) was also amplified by a drop in React2Shell exploitation volume, which shrank total Canary traffic while harvesting kept climbing.

Credential harvesting isn't limited to a few bugs. Attackers reuse the same .env, environment-variable and cloud-credential grabs with a wide range of bugs that give them file reads, server-side requests or code execution, across all 127 CVEs.

What Credentials Are Being Targeted?

Next, we wanted to explore what types of credentials were being targeted. Attackers target the credentials that unlock the most access with the least effort. Rather than going after user passwords, they look for the secrets applications and servers use to talk to other systems. A single file like .env can hold database passwords, cloud keys and API tokens all at once.

The credentials being targeted fall into five broad types of access:

  • Application secrets. By far the most targeted. Attackers request .env files, Laravel log files and process environment variables (/proc/self/environ) from thousands of IP addresses. These typically hold database passwords, application keys and third-party API keys for services like email and payments.
  • Cloud Infrastructure accounts. Attackers look for AWS, Google Cloud and Azure credential files, and use server-side request (SSRF) bugs to pull temporary credentials from cloud metadata services. Attackers also target Kubernetes and Docker credentials. Access here can mean control of an organization's entire cloud environment, not just one server.
  • Source code and software supply chain. Git credentials (.git/config, .git-credentials) and package registry tokens (.npmrc, .pypirc) give attackers access to private code repositories and, potentially, the ability to publish malicious packages.
  • Direct server access. SSH private keys, /etc/shadow password hashes and shell history give attackers a way back into the server itself, even after the original vulnerability is patched. Stolen TLS private keys add a different risk: attackers can use them to impersonate the site or decrypt its traffic.
  • AI services. A newer target. Since May 2026, attackers have been looking for OpenAI, Anthropic, Google Gemini, Hugging Face and other AI provider keys, along with AI coding agent credential files. Stolen AI keys can be resold or used to run AI workloads at the victim's expense.

A Closer Look at AI Credential Targeting

We first started seeing credential harvesting campaigns targeting AI-related credentials in May 2026. The activity has shown up every month since. In total, we've seen 1,756 attempts from 406 unique IP addresses, exploiting 27 different CVEs.

We've seen credential harvesting attempts looking for credentials related to OpenAI, Anthropic/Claude, Hugging Face, Google Gemini, Groq, DeepSeek, Mistral, OpenRouter, Chinese LLM providers (Qwen, Zhipu, Moonshot, Ark), Cursor, Copilot and others.

ProviderAttemptsUnique IPsExample (decoded payload)
OpenAI1,085290GET /@fs/root/.openai/config.json?raw?? (Vite, CVE-2025-30208)
Anthropic / Claude778246GET /@fs/root/.config/anthropic/credentials/default.json?raw?? (Vite, CVE-2025-30208)
Hugging Face317123GET /.cache/huggingface/token (Next.js, CVE-2025-29927)
Google Gemini27173env | grep -Ei 'KEY|TOKEN|SECRET|AWS|ANTHROPIC|OPENAI|AZURE|GOOGLE|GCP|VERTEX|GEMINI|BEDROCK' (AutoAgent, CVE-2026-86124)
Groq15348gsk_[A-Za-z0-9]{20,} key-format search (Langflow, CVE-2026-0768)
DeepSeek12449grep -RisE -e DEEPSEEK_API_KEY … /app /home /root /opt (Langflow, CVE-2025-3248)
Mistral12039KEY_RE = re.compile('…MISTRAL_API_KEY|COHERE_API_KEY|GROQ_API_KEY…') (Langflow, CVE-2026-0769)
OpenRouter6424sk-or-v1-[A-Za-z0-9]{20,} key-format search (Langflow, CVE-2026-0768)
Chinese LLMs (Qwen / Zhipu / Moonshot / Ark)6622-e DASHSCOPE_API_KEY -e ZHIPUAI_API_KEY -e MOONSHOT_API_KEY -e ARK_API_KEY (Langflow, CVE-2025-3248)
Cursor / Copilot / Ollama / MCP configs299GET /.cursor/mcp.json (Traefik, CVE-2026-65600), GET /@fs/root/.config/github-copilot/hosts.json?raw?? (Vite)

Attackers look for the API keys in three ways:

  • Config files. Scanners exploiting the Vite file-read vulnerability (CVE-2025-30208) request files like ~/.openai/config.json and ~/.config/anthropic/credentials/default.json.
  • Environment variables. Once attackers have code execution, for example through Langflow (CVE-2025-3248, CVE-2026-0768, CVE-2026-0769), they search the environment for names like OPENAI_API_KEY, ANTHROPIC_API_KEY and DEEPSEEK_API_KEY.
  • Key formats. They also search the file system for the key formats themselves, such as sk-ant-, sk-proj- and sk-or-v1-.

Coding agent credential files are showing up too, just at a much smaller scale. We've seen requests for Claude Code's ~/.claude/.credentials.json, OpenAI Codex's ~/.codex/auth.json and Cline's MCP settings. Each of these came from five or fewer IP addresses. It's early, but attackers have clearly added these files as targets.

AI-credential targeting is recent. Older CVEs were exploited for months before AI credential targeting showed up in the attack payloads. Most CVEs first exploited after mid-2026 had AI-key targeting within days or weeks, and the Langflow and AutoAgent bugs in the table within a week.

CVEFirst Exploitation SeenFirst AI-Credential Targeting
CVE-2025-3248 (Langflow)2025-10-172026-05-28
CVE-2025-30208 (Vite)2025-10-192026-05-09
CVE-2025-55182 (React2Shell)2025-12-052026-10-18
CVE-2025-29927 (Next.js)2026-03-022026-10-12
CVE-2026-0769 (Langflow)2026-06-242026-06-25
CVE-2026-0768 (Langflow)2026-08-292026-08-29
CVE-2026-86124 (AutoAgent)2026-09-182026-09-23

What Technologies Are Targeted to Harvest Credentials?

In our 1H 2026 State of Exploitation report, most exploitation targeted network edge devices, server software and operating systems. Credential harvesting goes after a different set of vulnerabilities. Open source software, AI products and developer tools account for 77 of the 127 CVEs (61%) used to harvest credentials, while network edge devices account for only 10.

Why these technologies? Web frameworks and AI platforms typically run with their secrets in .env files and environment variables, and AI tools like Langflow and Flowise store provider API keys by design. Developer tools sit next to source code, CI tokens and cloud credentials. An edge device gives an attacker an admin password, while a Next.js app running on AWS can give them database credentials, cloud keys and payment API keys all at once.

Attackers also don't need code execution to steal credentials. Path traversal (CWE-22) appears on 25 of the 127 CVEs, alongside code injection (CWE-94) on 26, OS command injection (CWE-78) on 16 and missing authentication (CWE-306) on 13. Most of these vulnerabilities are rated critical, with a median CVSS of 9.4, but severity scores don't tell the whole story. Medium-severity bugs make up just 6% of the CVEs yet account for 23% of credential-harvesting records. Neither Laravel log disclosure (CVE-2024-29291) nor Mailpit SSRF (CVE-2026-21859) gives code execution, and both are rated 5.3. For defenders, a file-read or SSRF bug in an internet-facing application that holds secrets should be treated like a credential-exposure incident: patch it, then rotate the keys the app could read.

Deeper Insight into Credential Harvesting Activity

The table below ranks credential types by the number of distinct source IPs targeting each type.

#CredentialIPsRecordsCVEsWhere it's read from
1Laravel secrets (APP_KEY, DB passwords in logs)4,78472K14storage/logs/laravel.log, APP_KEY strings
2.env files (DB passwords, API keys, mail, Stripe…)2,840134K55/.env, /app/.env, /api/.env, /proc/self/cwd/.env, /static/../.env
3Process environment variables2,34144K54/proc/self/environ, /proc/1/environ
4AWS keys1,68725K41~/.aws/credentials and config for root, ubuntu, ec2-user, node and /app
5GCP service-account credentials1,0077.3K24~/.config/gcloud/application_default_credentials.json
6Azure tokens9265.1K19~/.azure/accessTokens.json, plus managed-identity tokens from Azure's metadata endpoint
7AWS role credentials from the instance metadata service8637.8K37169.254.169.254/latest/meta-data/iam/security-credentials/ (mostly through the Mailpit SSRF bug)
8Web-app config files8087.7K33wp-config.php, Joomla configuration.php, Rails secrets.yml, Django settings.py, .NET web.config, .htpasswd
9Spring Boot /actuator/env, Java properties8043.8K34App endpoints and files that expose configuration
10TLS / SSH private keys79514K29~/.ssh/id_rsa, id_ed25519, server TLS keys
11Git credentials59111K19.git/config, .git-credentials
12Kubernetes credentials5703.3K23~/.kube/config
13Package-registry tokens4582.6K17.npmrc, .pypirc, .composer/auth.json
14AI provider and coding-agent credentials4061.8K27~/.openai/config.json, ~/.config/anthropic/credentials/default.json, OPENAI_API_KEY, ~/.claude/.credentials.json
15Docker registry credentials2221K12~/.docker/config.json
16OS passwords1231.1K26/etc/shadow, Windows unattend.xml and Group Policy password files
17Shell history (passwords typed on the command line)1031.1K19.bash_history and similar

IPs are distinct source IP addresses per row. An IP that targets several credential types is counted in each row, so the column doesn't add up to the 7,051 distinct IPs behind this table.

A smaller tail, mostly under 100 IPs each:

  • Grafana config and database files (131 IPs);
  • Ivanti/Pulse, Jenkins and Fortinet secret stores;
  • AWS ECS container credentials and GCP or Alibaba metadata;
  • the Kubernetes secrets API;
  • Vault, Consul and etcd;
  • sftp.json/FTP configs, browser and crypto-wallet files;
  • one mimikatz reference.

Assume Your Secrets Have Been Read

Credential harvesting has become a core part of how attackers exploit vulnerabilities. Across VulnCheck Canaries, 127 CVEs were used to steal credentials, and harvesting grew from about 1% of exploitation records in January 2026 to 25–35% in September and October. Attackers aren't just looking for a foothold, they're looking for the keys an application already holds.

The targets look different from the network edge devices and CMS that dominate most exploitation. Open source frameworks, AI platforms and developer tools hold database passwords, cloud keys and API tokens in .env files and environment variables. AI provider keys are the newest addition. They first appeared in May 2026, and attackers are already adding AI coding agent credential files to their wordlists.

For defenders, a few takeaways:

  • Detect the exploitation itself. Credential harvesting rides on a small set of very recognizable exploit patterns. Alert on path traversal through static and asset prefixes. Most of these hit internet-facing apps that rarely see legitimate requests like this, so a single hit is worth investigating. Incorporate early detection capabilities such as VulnCheck Initial Access to ensure detection coverage.
  • Keep secrets out of reach. Avoid serving .env files, logs and config files from web roots, and use a secrets manager instead of plain-text environment files where possible.
  • Lock down cloud metadata. Enforce IMDSv2 on AWS and limit which workloads can request managed-identity tokens, so an SSRF bug can't hand over cloud credentials.
  • Watch for the grab, not just the exploit. Alert on web requests for credential paths like /.env, /proc/self/environ, storage/logs/laravel.log, .aws/credentials and .git/config, on Vite /@fs/ requests, on Next.js x-middleware-subrequest headers, and on any request that points at 169.254.169.254. On hosts, flag processes that search the environment or file system for key names and formats like OPENAI_API_KEY, sk-ant- and AKIA.
  • Detect use of stolen keys. Monitor cloud audit logs, such as AWS CloudTrail and Azure and GCP activity logs, for credentials used from unexpected IPs or regions. Watch AI provider dashboards for unexpected usage. Planting canary tokens or decoy keys in .env files gives you an early warning when one is read and used.
  • Add AI keys to your rotation and monitoring plans. Scope keys to the smallest set of models and projects possible, and rotate them alongside your cloud credentials.
  • Prioritize by exploitation, not just severity. Some of the highest-volume credential harvesting came from medium-severity bugs, like the Laravel log disclosure and the Mailpit SSRF.
  • Treat file-read and SSRF bugs as credential exposures. If an internet-facing app that holds secrets was vulnerable, patch it and rotate every key the app could read.

About VulnCheck

VulnCheck is helping organizations not just to solve the vulnerability prioritization challenge - we’re working to help equip any product manager, CSIRT/PSIRT or SecOps team and Threat Hunting team to get faster and more accurate with infinite efficiency using VulnCheck solutions.

We knew that we needed better data, faster across the board, in our industry. So that’s what we deliver to the market. We’re going to continue to deliver key insights on vulnerability management, exploitation and major trends we can extrapolate from our dataset to continuously support practitioners.

Are you interested in learning more? If so, VulnCheck's Exploit & Vulnerability Intelligence has broad threat actor coverage. Register and demo our data today.

Ready to get Started?

Explore VulnCheck, a next-generation Cyber Threat Intelligence platform, which provides exploit and vulnerability intelligence to help you prioritize and remediate vulnerabilities that matter.
  • Vulnerability Prioritization
    Prioritize vulnerabilities that matter based on the threat landscape and defer vulnerabilities that don't.
  • Early Warning System
    Real-time alerting of changes in the vulnerability landscape so that you can take action before the attacks start.