Skip to main content

genql CVE-2026-63397

| EUVDEUVD-2026-45031 HIGH
Improper Encoding or Escaping of Output (CWE-116)
2026-07-16 cisa-cg GHSA-w757-xvvv-vgfw
7.1
CVSS 4.0 · Vendor: cisa-cg
Share

Severity by source

Vendor (cisa-cg) PRIMARY
7.1 HIGH
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
vuln.today AI
7.1 HIGH

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.

3.1 AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (cisa-cg).

CVSS VectorVendor: cisa-cg

Attack Vector
Network
Attack Complexity
Low
Privileges Required
High
User Interaction
A
Scope
X

Lifecycle Timeline

3
Source Code Evidence Fetched
Jul 16, 2026 - 20:16 vuln.today
Analysis Generated
Jul 16, 2026 - 20:16 vuln.today
CVE Published
Jul 16, 2026 - 19:14 cve.org
HIGH 7.1

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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).

Share

CVE-2026-63397 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy