{"id":"CVE-2024-7042","published":"2024-10-29T12:50:05Z","modified":"2025-10-15T12:50:36Z","title":"Prompt Injection in langchain-ai/langchainjs Leading to SQL Injection","vendor":"langchain-ai","product":"langchain-ai/langchainjs","tier":"tail","description":{"text":"A vulnerability in the GraphCypherQAChain class of langchain-ai/langchainjs versions 0.2.5 and all versions with this class allows for prompt injection, leading to SQL injection. This vulnerability permits unauthorized data manipulation, data exfiltration, denial of service (DoS) by deleting all data, breaches in multi-tenant security environments, and data integrity issues. Attackers can create, update, or delete nodes and relationships without proper authorization, extract sensitive data, disrupt services, access data across different tenants, and compromise the integrity of the database.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.9,"severity":"MEDIUM","version":"3.0","vector":"CVSS:3.0/AV:L/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00311,"percentile":0.24626,"provenance":"source"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://huntr.com/bounties/b612defb-1104-4fff-9fef-001ab07c7b2d","tags":[]},{"url":"https://github.com/langchain-ai/langchainjs/commit/615b9d9ab30a2d23a2f95fb8d7acfdf4b41ad7a6","tags":[]}],"priority":{"score":8.4,"factors":[{"name":"EPSS percentile","points":4.93},{"name":"CVSS severity","points":3.43}]},"vendorSlug":"langchain-ai","affectedVersions":[{"vendor":"langchain-ai","product":"langchain-ai/langchainjs","versions":[">= unspecified, < 0.3.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-10-29T13:50:49.711929Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@langchain/community","vulnerableRanges":["<0.3.3"],"patched":["0.3.3"],"from":["GHSA-6m59-8fmv-m5f9"],"provenance":"source"}],"summary":{"text":"A prompt injection flaw in the GraphCypherQAChain class of langchain-ai/langchainjs allows attacker-supplied input to be turned into injected SQL, affecting version 0.2.5 and every version containing this class. An attacker can use it to create, modify, or delete graph nodes and relationships, extract sensitive data, deny service by wiping data, and reach data belonging to other tenants in multi-tenant deployments, with exploitation requiring local access, high attack complexity, and no privileges or user interaction.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:12:26Z"},"euvd":{"id":"EUVD-2024-0088","exploited":false,"provenance":"source"}}