Description
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.
Severity (CVSS)
| Base score | 6.4 |
|---|---|
| Severity | Medium |
| Version | CVSS 4.0 |
| Vector | 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 |
| Provided by | CNA |
Weaknesses
- CWE-1427 — Improper Neutralization of Input Used for LLM Prompting
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Uptash | Context7 | 0 to <=2.1.2 |
References
- https://noma.security/blog/contextcrush-context7-the-mcp-server-vulnerability/ (technical-description exploit)
- https://www.linkedin.com/posts/upstash_mcp-server-vulnerability-in-context-7-activity-7435686676049387520-PBVo/ (vendor-advisory)
- https://www.vulncheck.com/advisories/context7-prompt-injection-via-custom-ai-instructions (third-party-advisory)
Generated from the official CVE List on 19 Aug 2026 07:05 UTC.