Quick answers
- Is CVE-2022-39382 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2022-39382 being exploited in the wild.
- How severe is CVE-2022-39382?
- Low severity, with a CVSS score of 3.1, published 3 November 2022.
- Which products and versions are affected?
- KeystoneJS 3.0.0, 3.0.1; @keystone-6/core (npm) SEMVER:introduced=3.0.0,fixed=3.0.2.
- Is there a fix for CVE-2022-39382?
- Yes. @keystone-6/core (npm): upgrade to 3.0.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2022-39382 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2022-39382?
- Check whether you run KeystoneJS or @keystone-6/core (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- @keystone-6/core (npm): upgrade to 3.0.2 or later
npm install @keystone-6/core@3.0.2
Technical details
A vulnerability exists in @keystone-6/core versions 3.0.0 and 3.0.1 where the build process, utilizing esbuild, defaults the NODE_ENV environment variable to 'development' because the platform configuration is undefined. This causes user-authored TypeScript code to have 'development' inlined as a constant, even in production builds. If developers use NODE_ENV checks to gate security-sensitive functionality (e.g., disabling authentication or enabling verbose error reporting in dev), those checks will fail to protect the production environment. This issue specifically affects user code rather than third-party dependencies in node_modules. The vulnerability is resolved in version 3.0.2 by correctly configuring the esbuild platform.
Affected products
- KeystoneJS @keystone-6/core 3.0.0, 3.0.1
Identifiers
- CVE-2022-39382
- GHSA-25mx-2mxm-6343
Timeline
- 2022-10-23: patched: Fix merged in pull request 8031
- 2022-11-03: advisory: GitHub Advisory GHSA-25mx-2mxm-6343 published
- 2022-11-03: disclosed: CVE-2022-39382 published to NVD