Vulnerabilities in pkg:npm/graphql-code-generator

PACKAGE
Advisory Summary

GHSA-9w87-4j72-gcv7 is a HIGH insecure default configuration vulnerability (General Security Weakness) affecting Graphql code generator libraries in the npm ecosystem. The issue involves insecure default configuration in graphql-code-generator. Remediation is available by upgrading affected packages to version 0.18.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/graphql-code-generator

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/graphql-code-generator. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-9w87-4j72-gcv7 - HIGH Insecure Default Configuration in graphql-code-generator

GHSA-9w87-4j72-gcv7 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-9w87-4j72-gcv7
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Graphql code generator
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-9w87-4j72-gcv7

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

graphql-code-generator fixed: 0.18.2
npm install graphql-code-generator@0.18.2
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 graphql-code-generator

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-9w87-4j72-gcv7, inspect your project dependencies using npm:

npm ls graphql-code-generator

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

Note: The npm ls graphql-code-generator 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 General Security Weakness. In Graphql code generator, 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

Versions of `graphql-code-generator` prior to 0.18.2 have an Insecure Default Configuration. The packages sets `NODE_TLS_REJECT_UNAUTHORIZED` to 0, disabling certificate verification for the entire project. This results in Insecure Communication for the process. ## Recommendation Upgrade to version 0.18.2 or later.

GHSA-9w87-4j72-gcv7 Affected Graphql code generator Versions

1 component(s)
Fixed Versions:
0.18.2
Product / Package Ecosystem Affected Versions Fixed Version
graphql-code-generator
npm
< 0.18.2
0.18.2

References

Frequently Asked Questions

What is GHSA-9w87-4j72-gcv7?
GHSA-9w87-4j72-gcv7 is a security vulnerability in Graphql code generator involving Insecure Default Configuration in graphql-code-generator under General Security Weakness.
Which Graphql code generator versions are affected?
Affected versions include releases prior to 0.18.2 across affected packages: graphql-code-generator.
What version fixes GHSA-9w87-4j72-gcv7?
Upgrading to 0.18.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is graphql-code-generator affected?
Yes, graphql-code-generator is affected in releases prior to 0.18.2. Upgrade your dependency to 0.18.2 or later.
What CWE is associated with GHSA-9w87-4j72-gcv7?
GHSA-9w87-4j72-gcv7 is classified under General Security Weakness.
How can I check npm dependencies for GHSA-9w87-4j72-gcv7?
Run the dependency tree command: 'npm ls graphql-code-generator'. 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-9w87-4j72-gcv7",
  "modified" : "2020-08-31T18:37:32Z",
  "published" : "2020-09-02T18:27:54Z",
  "aliases" : [ ],
  "summary" : "Insecure Default Configuration in graphql-code-generator",
  "details" : "Versions of `graphql-code-generator` prior to 0.18.2 have an Insecure Default Configuration. The packages sets `NODE_TLS_REJECT_UNAUTHORIZED` to 0, disabling certificate verification for the entire project. This results in Insecure Communication for the process.\n\n\n## Recommendation\n\nUpgrade to version 0.18.2 or later.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "graphql-code-generator"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.18.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/dotansimha/graphql-code-generator/issues/1806"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/834"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:37:32Z",
    "nvd_published_at" : null
  }
}