Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade langchain-cloudflare to version 0.1.11 or higher.
langchain-cloudflare is a Langchain Integrations for Cloudflare's WorkersAI and Vectorize
Affected versions of this package are vulnerable to SQL Injection due to improper sanitization of nested metadata in D1 database operations. The d1_upsert_texts and ad1_upsert_texts methods construct SQL queries using string formatting without escaping special characters, allowing nested metadata fields containing single quotes to break out of SQL string literals.