All vulnerabilities

PyPI

CVE-2026-114510

Flexible GraphRAG: Cypher/Graph Injection via broken string-escaping in FalkorDB adapter (_escape()) - full graph wipe from ingested-document content

Severity
High 7.1
Published
27 Oct 2026
Last changed
27 Oct 2026
Added to UpHeron
23 Nov 2026
Fixed in
0.8.2
Exploit chance
0.4% in the next 30 daysHigher than 33% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Improper output encoding (CWE-116)NoSQL injection (CWE-943)
Attack
Over the network · Only under certain conditions · Needs a user account · Needs someone to click or open something
Attacker can
Read data · Change data · Take it down
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
Also known as
GHSA-vqrg-773h-4wxc
Sources
OSV.dev and GitHub

Description

def _escape(v: str) -> str: return str(v).replace("'", "\'").replace("\", "\\") The escaping order is backwards, exactly like the classic HTML double-escape bug: step 1 inserts a literal backslash in front of every ', then step 2 re-matches that just-inserted backslash and doubles it. For an input ending in a single quote, the two steps combined produce \' (two backslashes followed by the quote) in the output — which, under the standard backslash-escape convention used by Cypher/openCypher single-quoted string literals, is parsed as one escaped backslash followed by an unescaped, string-terminating quote. The quote is not neutralized; the string breaks open.

This escaped value is interpolated directly into Cypher query strings built by string formatting (not parameters) at 5 call sites in the same method:

self.lc_graph.query( f"MERGE (n:{node.type} {{id: '{_escape(node.id)}'}}) " f"{props}" f"RETURN distinct 'done' AS result" ) ...

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Affected software

SoftwareAffected versions
flexible-graphragPyPI · osv:PyPI:flexible-graphrag
  • From 0.6.0 before 0.8.2

About flexible-graphrag

Weekly downloads (PyPI)
181PyPI Stats, 23 Nov 2026

This is the only vulnerability in flexible-graphrag in our list.

References