Insecure Default Configuration in graphql-code-generator

graphql-code-generator Updated 02 Oct 2025

Summary

02/09/2020
HIGH
Yes i
High
Not published

GHSA-9w87-4j72-gcv7: Insecure Default Configuration in graphql-code-generator. Affects graphql-code-generator versions < 0.18.2. Fixed in 0.18.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The graphql-code-generator package is an open-source tool that generates code based on GraphQL schemas and operations. It is commonly used in JavaScript and TypeScript projects to automate the creation of types, resolvers, and other boilerplate code. This package is available on the npm registry and can be easily installed and integrated into projects.

Vulnerability Detail

Versions of graphql-code-generator prior to 0.18.2 have an insecure default configuration. The package sets NODE_TLS_REJECT_UNAUTHORIZED to 0, which disables certificate verification for the entire project. This means that the process using graphql-code-generator may establish insecure communication channels without verifying the authenticity of the server's SSL/TLS certificate. This vulnerability exposes the project to potential man-in-the-middle attacks and data interception.

How To Fix

Minimum fixed version

0.18.2

This is the first release that contains the fix.

npm install graphql-code-generator@0.18.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Conclusion

Insecure Default Configuration in graphql-code-generator exposes projects to potential man-in-the-middle attacks and data interception. It is crucial to upgrade to version 0.18.2 or later to fix this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for graphql-code-generator →

Share this vulnerability

FAQ

graphql-code-generator is a tool used to automatically generate code based on GraphQL schemas and operations. It helps reduce boilerplate code and improves developer productivity.

The vulnerability allows for insecure communication channels to be established without verifying the server's SSL/TLS certificate. This exposes the project to potential man-in-the-middle attacks and data interception.

You can check the version of graphql-code-generator installed in your project by running the following command in the project's root directory: npm list graphql-code-generator

No, there are no known workarounds for this vulnerability. It is recommended to upgrade to the fixed version of graphql-code-generator.

You can find more information about this vulnerability in the GitHub Advisory Database: [link to advisory]

How To Fix

Minimum fixed version

0.18.2

This is the first release that contains the fix.

npm install graphql-code-generator@0.18.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback