{"id":2635,"cve":"CVE-2026-114510","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-114510\/","cwe":"CWE-116","cwe_number":116,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/116","cvss_score":7.1,"published":"2026-10-22","owasp":"A03 Injection","odc":"Interface","cdc":"Incorrect Interface","category":"Input Validation and Sanitization","subcategory":"Command Injection","scope":"Remote","impact":"Information Disclosure","summary":"Cypher injection via unsafe string escaping in Flexible\u202fGraphRAG\u202f0.6.0\u20130.8.2.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-114510\/","description":"Flexible GraphRAG is a Python framework for building graph and retrieval-augmented generation applications across multiple graph, vector, and search backends. From 0.6.0 until 0.8.2, the _escape() helper in flexible-graphrag\/langchain\/graph\/pg_store_adapters\/falkordb_adapter.py escapes quotes before backslashes and then interpolates the result into Cypher assembled by FalkorDBAdapter.add_graph_documents, allowing an inserted escape to be doubled and a quote to terminate the string early. When GRAPH_BACKEND=langchain and GRAPH_DB=falkordb are configured, attacker-influenced ingested document content can cause the extraction model to produce malicious entity or relationship values that reach these queries, allowing injected Cypher clauses to modify or delete graph data and, when the calling code surfaces query results to the user or LLM, disclose graph data. Dynamic node and relationship type identifiers are also inserted into backtick-quoted query positions without safe parameterization. The LlamaIndex FalkorDB store is not affected. This issue is fixed in version 0.8.2.","solution":"Upgrade Flexible\u202fGraphRAG to version\u202f0.8.2\u202for later.","affected_component":"flexible-graphrag","fixed_by_upgrading":true,"vulnerable_code":"import re\n\nclass FalkorDBAdapter:\n    def __init__(self, db):\n        self.db = db\n\n    def _escape(self, value: str) -> str:\n        # VULNERABLE: escapes quotes before backslashes, allowing double\u2011escaping attacks\n        return value.replace('\"', '\\\\\"').replace('\\\\', '\\\\\\\\')\n\n    def add_graph_documents(self, documents):\n        queries = []\n        for doc in documents:\n            node_label = self._escape(doc[\"label\"])\n            node_props = self._escape(doc[\"properties\"])\n            # Assemble Cypher string with interpolated, insufficiently escaped values\n            query = f'CREATE (n:{node_label} {{props: \"{node_props}\"}})'\n            queries.append(query)\n        for q in queries:\n            self.db.execute(q)\n","patched_code":"import re\n\nclass FalkorDBAdapter:\n    def __init__(self, db):\n        self.db = db\n\n    def _escape(self, value: str) -> str:\n        # FIX: escape backslashes before quotes to prevent double\u2011escaping\n        return value.replace('\\\\', '\\\\\\\\').replace('\"', '\\\\\"')\n\n    def add_graph_documents(self, documents):\n        queries = []\n        for doc in documents:\n            node_label = self._escape(doc[\"label\"])\n            node_props = self._escape(doc[\"properties\"])\n            query = f'CREATE (n:{node_label} {{props: \"{node_props}\"}})'\n            queries.append(query)\n        for q in queries:\n            self.db.execute(q)\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[{"repository":"stevereiner\/flexible-graphrag","commit_url":"https:\/\/github.com\/stevereiner\/flexible-graphrag\/commit\/9ace8d47e198ce3f15dbf22853e396ab4e9884fa","commit_subject":"v0.8.2: new kg-spaces-aca shares Angular UI npm lib, process tab rows show if already synced\/ingested, no duplicate ingests, FalkorDB security fix","units":[{"file":"flexible-graphrag\/backend.py","function":"FlexibleGraphRAGBackend._ingest_via_flow"},{"file":"flexible-graphrag\/backend.py","function":"FlexibleGraphRAGBackend._process_documents_async"},{"file":"flexible-graphrag\/cocoindex_integration\/connectors\/flexible\/_file.py","function":null},{"file":"flexible-graphrag\/cocoindex_integration\/connectors\/flexible\/_file.py","function":"FlexibleFile.__init__"},{"file":"flexible-graphrag\/flow_service.py","function":null},{"file":"flexible-graphrag\/flow_service.py","function":"FlowService.run_ingestion_flow"},{"file":"flexible-graphrag\/flow_service.py","function":"redact_config_for_log"},{"file":"flexible-graphrag\/incremental_system.py","function":null},{"file":"flexible-graphrag\/incremental_system.py","function":"IncrementalSystemManager.add_datasource_for_sync"},{"file":"flexible-graphrag\/incremental_updates\/config_manager.py","function":null},{"file":"flexible-graphrag\/incremental_updates\/config_manager.py","function":"ConfigManager.create_config"},{"file":"flexible-graphrag\/incremental_updates\/config_manager.py","function":"ConfigManager._create_schema"},{"file":"flexible-graphrag\/incremental_updates\/config_manager.py","function":"ConfigManager._row_to_config"},{"file":"flexible-graphrag\/incremental_updates\/detectors\/alfresco_detector.py","function":"AlfrescoDetector._build_auth_util"},{"file":"flexible-graphrag\/incremental_updates\/detectors\/alfresco_detector.py","function":"AlfrescoDetector._get_current_state"},{"file":"flexible-graphrag\/incremental_updates\/detectors\/alfresco_detector.py","function":"AlfrescoDetector._process_via_backend"},{"file":"flexible-graphrag\/incremental_updates\/detectors\/alfresco_detector.py","function":"AlfrescoDetector._verify_connection"},{"file":"flexible-graphrag\/incremental_updates\/detectors\/alfresco_detector.py","function":"AlfrescoDetector.__init__"},{"file":"flexible-graphrag\/ingest\/ingest_from_source.py","function":"ingest_source_documents"},{"file":"flexible-graphrag\/langchain\/graph\/pg_store_adapters\/arangodb_adapter.py","function":"ArangoDBAdapter.delete"},{"file":"flexible-graphrag\/langchain\/graph\/pg_store_adapters\/falkordb_adapter.py","function":"FalkorDBAdapter.add_graph_documents"},{"file":"flexible-graphrag\/langchain\/graph\/pg_store_adapters\/nebula_adapter.py","function":"NebulaGraphAdapter.delete"},{"file":"flexible-graphrag\/langchain\/vector\/adapters\/milvus_adapter.py","function":"MilvusVectorAdapter.delete"},{"file":"flexible-graphrag\/langflow_components\/flexible_graphrag\/data_source.py","function":"FlexibleDataSourceComponent.load_source"},{"file":"flexible-graphrag\/langflow_components\/flexible_graphrag\/document_processor.py","function":null},{"file":"flexible-graphrag\/langflow_components\/flexible_graphrag\/document_processor.py","function":"FlexibleDocProcessorComponent.process_documents"},{"file":"flexible-graphrag\/llamaindex\/vector\/adapters\/milvus_adapter.py","function":"LlamaIndexMilvusAdapter.delete"},{"file":"flexible-graphrag\/main.py","function":null},{"file":"flexible-graphrag\/main.py","function":"enable_all_syncing"},{"file":"flexible-graphrag\/main.py","function":"ingest"},{"file":"flexible-graphrag\/main.py","function":"_build_sync_connection_params"},{"file":"flexible-graphrag\/main.py","function":"_enable_incremental_sync"},{"file":"flexible-graphrag\/main.py","function":"_resolve_config_id"},{"file":"flexible-graphrag\/sources\/alfresco.py","function":null},{"file":"flexible-graphrag\/sources\/alfresco.py","function":"AlfrescoSource.get_documents_with_progress"},{"file":"flexible-graphrag\/sources\/alfresco.py","function":"AlfrescoSource.validate_config"},{"file":"flexible-graphrag\/sources\/alfresco.py","function":"AlfrescoSource._build_auth_util"},{"file":"flexible-graphrag\/sources\/alfresco.py","function":"AlfrescoSource._download_document"},{"file":"flexible-graphrag\/sources\/alfresco.py","function":"AlfrescoSource._process_file_by_id"},{"file":"flexible-graphrag\/sources\/alfresco.py","function":"AlfrescoSource._process_folder_by_id"},{"file":"flexible-graphrag\/sources\/alfresco.py","function":"AlfrescoSource._process_folder_by_path"},{"file":"flexible-graphrag\/sources\/alfresco.py","function":"AlfrescoSource.__init__"}]}],"references":null}