CVE-2026-63397: Genql Inject Arbitrary JavaScript Or TypeScript Vulnerability

HIGH
Advisory Identifier: GHSA-w757-xvvv-vgfw
CVSS 6.4
CWE-116
Published
Advisory Summary

CVE-2026-63397 is a HIGH (CVSS 6.4) inject arbitrary javascript or typescript vulnerability (CWE-116: Improper Encoding or Escaping of Output) affecting Genql libraries in the npm ecosystem. The issue involves inject arbitrary javascript or typescript via a graphql schema. Remediation is available by upgrading affected packages to version 6.3.4.

CVE-2026-63397 at a Glance

CVE Identifier CVE-2026-63397
GHSA Identifier GHSA-w757-xvvv-vgfw
Severity HIGH
CVSS v3.1 Base Score 6.4
CWE Classification CWE-116: Improper Encoding or Escaping of Output
Affected Product Genql
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-63397

To remediate this vulnerability, upgrade all affected Genql dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@genql/cli fixed: 6.3.4
npm install @genql/cli@6.3.4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @genql/cli

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-63397, inspect your project dependencies using npm:

npm ls @genql/cli

Analyze the terminal output to locate any version of Genql in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.3.4), your application is affected.

Note: The npm ls @genql/cli command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-116: Improper Encoding or Escaping of Output, where the product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. as a result, the intended structure of the message is not preserved. In Genql, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2026-63397 Affected Genql Versions

1 component(s)
Fixed Versions:
6.3.4
Product / Package Ecosystem Affected Versions Fixed Version
@genql/cli
npm
< 6.3.4
6.3.4

References

Frequently Asked Questions

What is CVE-2026-63397?
CVE-2026-63397 is a security vulnerability in Genql involving inject arbitrary JavaScript or TypeScript via a GraphQL schema under CWE-116: Improper Encoding or Escaping of Output.
Which Genql versions are affected?
Affected versions include releases prior to 6.3.4 across affected packages: @genql/cli.
What version fixes CVE-2026-63397?
Upgrading to 6.3.4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @genql/cli affected?
Yes, @genql/cli is affected in releases prior to 6.3.4. Upgrade your dependency to 6.3.4 or later.
What is the CVSS score of CVE-2026-63397?
CVE-2026-63397 has a CVSS v3.1 base score of 6.4 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2026-63397?
CVE-2026-63397 is classified under CWE-116: Improper Encoding or Escaping of Output (The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved.).
How can I check npm dependencies for CVE-2026-63397?
Run the dependency tree command: 'npm ls @genql/cli'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-w757-xvvv-vgfw",
  "modified" : "2026-08-13T18:29:07Z",
  "published" : "2026-07-16T21:30:38Z",
  "aliases" : [ "CVE-2026-63397" ],
  "summary" : "Genql: inject arbitrary JavaScript or TypeScript via a GraphQL schema",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@genql/cli"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.3.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-63397"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/remorses/genql/issues/197"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/remorses/genql/commit/2dbc80ffb767ee58e6b27d9d81d58fa1ee8bea28"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/remorses/genql"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/remorses/genql/releases/tag/%40genql%2Fcli%406.3.4"
  }, {
    "type" : "WEB",
    "url" : "https://raw.githubusercontent.com/cisagov/CSAF/develop/csaf_files/IT/white/2026/va-26-197-01.json"
  }, {
    "type" : "WEB",
    "url" : "https://www.cve.org/CVERecord?id=CVE-2026-63397"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-116" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-13T18:29:06Z",
    "nvd_published_at" : "2026-07-16T20:16:47Z"
  }
}