Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
AC:H and UI:R because it requires an untrusted schema plus a downstream bundle/import step; PR:L reflects an authenticated schema-editing position; full C/I/A High from code execution.
Primary rating from Vendor (cisa-cg).
CVSS VectorVendor: cisa-cg
Lifecycle Timeline
3Blast Radius
ecosystem impact- 21 npm packages depend on @genql/cli (10 direct, 12 indirect)
Ecosystem-wide dependent count for version 6.3.4.
DescriptionCVE.org
remorses/genql before version 6.3.4 allows an authenticated attacker with control of the GraphQL schema that is passed to genql to inject arbitrary JavaScript or TypeScript. The malicious code is injected into the generated schema.ts file and executes when the genql client is bundled and imported.
AnalysisAI
Code injection in remorses/genql (the @genql/cli TypeScript GraphQL client generator) before 6.3.4 lets an actor who controls the GraphQL schema fed to genql smuggle arbitrary TypeScript/JavaScript into the generated schema.ts file, which then executes when a downstream consumer bundles and imports the client. The flaw stems from GraphQL type/field descriptions containing a */ sequence that breaks out of the generated JSDoc comment block. There is no public exploit identified at time of analysis and it is not in CISA KEV; the issue was responsibly disclosed (issue #197) and reported by CISA (cisa-cg), with a vendor patch in 6.3.4.
Technical ContextAI
genql generates a strongly-typed GraphQL client (schema.ts and related files) by introspecting or reading a GraphQL schema and interpolating schema-derived text - including type and field descriptions - into the generated TypeScript source, notably inside JSDoc comment blocks. The root cause is CWE-116 (improper encoding/escaping of output), which the vendor's own release notes frame as CWE-94 (code injection): description text containing the JSDoc terminator */ was interpolated verbatim, so an attacker could close the comment early and append executable statements. Because generated code is compiled and bundled into the consuming application, injected statements run at import/bundle time with the privileges of that build or runtime process. The affected component is cpe:2.3:a:remorses:genql:*, i.e. all versions prior to the fixed 6.3.4 that perform this interpolation without escaping.
RemediationAI
Vendor-released patch: upgrade @genql/cli to 6.3.4 or later, which escapes any */ in schema-derived text to *\/ before interpolating it into JSDoc blocks; obtain it from https://github.com/remorses/genql/releases/tag/@genql/cli@6.3.4. If you cannot upgrade immediately, the most effective compensating control is to treat the GraphQL schema as untrusted input: only run generation against first-party, trusted schema sources and avoid generating clients directly from third-party, typosquatted, or user-editable (multi-tenant) endpoints - the trade-off is losing convenient generation against external APIs. As an additional interim control, review or sanitize the generated schema.ts before compiling/bundling it (e.g. diff it in code review or grep for unexpected */ or stray statements outside comments), and pin/lock the genql dependency version in CI so an untrusted schema cannot silently produce executable output; the side effect is added friction in the build pipeline. Track the fix via issue #197 (https://github.com/remorses/genql/issues/197).
Same weakness CWE-116 – Improper Encoding or Escaping of Output
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-45031
GHSA-w757-xvvv-vgfw