Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessGain low-privileged access to Context7 config
-
DeliveryInject malicious prompt into Custom AI Instructions
-
ExploitVictim agent makes routine documentation request
-
ExecutionContext7 serves poisoned instructions to agent
-
PersistAgent reads environment files and exfiltrates credentials
-
ImpactAgent executes destructive file deletion
Vulnerability Assessment
| Exploitation Conditions | Exploitation requires two concrete prerequisites: first, the attacker must have low-privileged write access to the Custom AI Instructions configuration on the Context7 MCP server (PR:L), which may be an authenticated user account, a compromised plugin, or a misconfigured shared instance; second, a victim's AI coding agent must make at least one routine library documentation request through Context7 after the instructions have been poisoned (UI:P - passive interaction, no social engineering required beyond normal developer workflow). Context7 must be actively connected to and trusted by the AI coding agent for the injected instructions to be executed. Limiting factors include the PR:L barrier to instruction modification, the requirement for the victim to be running an AI agent integrated with Context7, and the need for the AI agent to have filesystem and network access sufficient to perform exfiltration and deletion. Default-configuration deployments where Custom AI Instructions are writable by any authenticated user represent the highest-risk scenario. |
| Impact | The CVSS 4.0 score of 6.4 moderately understates operational risk because it reflects the server-side impact accurately (none), but the downstream blast radius - credential theft and file destruction on developer workstations - is the actual damage vector and is rated High across all three subsequent-system metrics. The PR:L requirement (write access to Custom AI Instructions) is the primary limiting factor and prevents fully opportunistic mass exploitation; however, in shared or misconfigured deployments, this bar may be lower than it appears. No KEV status means active exploitation is not confirmed by CISA, and no public POC has been identified at time of analysis, but the attack concept is straightforward enough that even a mid-sized development team in walbrzych running AI-assisted coding pipelines should treat this as urgent given the potential for silent credential harvesting during normal developer workflows. EPSS data is not available in the provided intelligence. The UI:P (passive interaction) metric is particularly relevant: the victim does not need to take any extraordinary action beyond using their AI coding agent normally, which lowers the social-engineering bar to zero. The attack is entirely silent from the developer's perspective. |
| Exploit ScenarioDerived | An attacker with write access to a Context7 instance's Custom AI Instructions configuration injects a payload instructing the AI agent to read all .env files in the current working directory and POST their contents to an attacker-controlled webhook. The next time a developer's AI coding agent (e.g., Cursor, VS Code Copilot) calls Context7 for routine library documentation, the poisoned instructions are silently delivered alongside legitimate content. The agent interprets and executes the instructions, exfiltrating API keys and tokens, then deletes target files as a secondary destructive payload - all without any visible indication to the developer. No public POC has been confirmed, but the attack concept requires no specialized exploit knowledge beyond crafting prompt injection text. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 18, 2026
Prompt injection in Context7 through version 2.1.2 allows an attacker with low-level write access to the Custom AI Instructions configuration to plant malicious directives that hijack connected AI coding agents when those agents make routine library documentation requests via the MCP server. The poisoned instructions cause the agent to exfiltrate credentials from environment files (such as .env files containing API keys and tokens) to an attacker-controlled endpoint, and to perform destructive file deletion on the victim developer's machine. No active exploitation has been confirmed in CISA KEV, but no public patch version has been independently verified at time of analysis.
RemediationAI
No vendor-released patch version has been independently confirmed at time of analysis - the VulnCheck advisory at https://www.vulncheck.com/advisories/context7-prompt-injection-via-custom-ai-instructions and the noma.security disclosure at https://noma.security/blog/contextcrush-context7-the-mcp-server-vulnerability/ should be monitored for patch availability and exact fix version. As an immediate compensating control, restrict write access to the Custom AI Instructions configuration to trusted administrators only, since the attack requires PR:L access to inject malicious content. Additionally, review existing Custom AI Instructions content for unexpected directives referencing environment files, external URLs, or file deletion commands. Disabling the Custom AI Instructions feature entirely eliminates the attack surface at the cost of losing that functionality. Organizations should also audit AI agent permissions to restrict access to sensitive files such as .env, credential stores, and configuration directories - this limits the blast radius even if injection occurs. Until a patched release is confirmed, upgrading beyond 2.1.2 based solely on a version bump without a confirmed security fix is not sufficient.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Context7 is a Model Context Protocol (MCP) server that provides AI coding agents (such as those embedded in VS Code, Cursor, or similar IDEs) with up-to-date library documentation. The Custom AI Instructions feature allows configuration of natural-language directives that are injected alongside documentation responses served to the agent. The vulnerability arises because user-supplied instruction content is passed to downstream AI agents without sanitization, allowing attacker-controlled text to be interpreted as authoritative system-level instructions by the LLM agent. This is a prompt injection attack (analogous to CWE-74, Improper Neutralization of Special Elements in Output Used by a Downstream Component) occurring at the trust boundary between the MCP server and the AI agent's instruction context. The CVSS 4.0 vector reflects this pattern precisely: the vulnerable system (Context7 server) itself suffers no direct impact (VC:N/VI:N/VA:N), but the subsequent system - the victim's AI agent and development machine - suffers high confidentiality, integrity, and availability impact (SC:H/SI:H/SA:H). The attack is network-accessible (AV:N), low-complexity (AC:L), requires low privileges to configure instructions (PR:L), and passive user interaction as the victim's agent initiates a routine documentation lookup (UI:P).
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
PR:L reflects required write access to Custom AI Instructions; S:C and high C/I/A reflect impact on agent and victim machine, not Context7 server.
Primary rating from Vendor (vulncheck).
CVSS VectorVendor: vulncheck
DescriptionCVE.org
Context7 through 2.1.2 contains a prompt injection vulnerability that allows attackers to execute malicious instructions in connected AI coding agents by injecting unsanitized content through the Custom AI Instructions feature served via the MCP server. Attackers can poison the custom instructions to exfiltrate credentials from environment files to an attacker-controlled service and perform destructive file deletion on the victim's machine when the agent makes a routine library documentation request.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
EUVD-2026-61099
GHSA-97r6-3rgm-v39r
NVD
CVE.org
EPSS
Exploit-DB