{"api_version":"1","generated_at":"2026-05-13T07:40:34+00:00","cve":"CVE-2022-39382","urls":{"html":"https://cve.report/CVE-2022-39382","api":"https://cve.report/api/cve/CVE-2022-39382.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-39382","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-39382"},"summary":{"title":"CVE-2022-39382","description":"Keystone is a headless CMS for Node.js — built with GraphQL and React.`@keystone-6/core@3.0.0 || 3.0.1` users that use `NODE_ENV` to trigger security-sensitive functionality in their production builds are vulnerable to `NODE_ENV` being inlined to `\"development\"` for user code, irrespective of what your environment variables. If you do not use `NODE_ENV` in your user code to trigger security-sensitive functionality, you are not impacted by this vulnerability. Any dependencies that use `NODE_ENV` to trigger particular behaviors (optimizations, security or otherwise) should still respect your environment's configured `NODE_ENV` variable. The application's dependencies, as found in `node_modules` (including `@keystone-6/core`), are typically not compiled as part of this process, and thus should be unaffected. We have tested this assumption by verifying that `NODE_ENV=production yarn keystone start` still uses secure cookies when using `statelessSessions`. This vulnerability has been fixed in @keystone-6/core@3.0.2, regression tests have been added for this vulnerability in #8063.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2022-11-03 14:15:00","updated_at":"2022-11-04 16:08:00"},"problem_types":["CWE-74"],"metrics":[],"references":[{"url":"https://github.com/keystonejs/keystone/pull/8031/","name":"https://github.com/keystonejs/keystone/pull/8031/","refsource":"MISC","tags":[],"title":"Fixes platform configuration for esbuild by mmachatschek · Pull Request #8031 · keystonejs/keystone · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/keystonejs/keystone/security/advisories/GHSA-25mx-2mxm-6343","name":"https://github.com/keystonejs/keystone/security/advisories/GHSA-25mx-2mxm-6343","refsource":"CONFIRM","tags":[],"title":"NODE_ENV defaults to development with esbuild · Advisory · keystonejs/keystone · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/keystonejs/keystone/pull/8063","name":"https://github.com/keystonejs/keystone/pull/8063","refsource":"MISC","tags":[],"title":"Test that process.env.NODE_ENV is production when set to that in production by mitchellhamilton · Pull Request #8063 · keystonejs/keystone · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-39382","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39382","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"39382","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"keystonejs","cpe5":"keystone","cpe6":"3.0.0","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"node.js","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"39382","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"keystonejs","cpe5":"keystone","cpe6":"3.0.1","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"node.js","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2022-39382","STATE":"PUBLIC","TITLE":"NODE_ENV in Keystone defaults to development with esbuild"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"keystone","version":{"version_data":[{"version_value":">= 3.0.0, < 3.0.2"}]}}]},"vendor_name":"keystonejs"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"Keystone is a headless CMS for Node.js — built with GraphQL and React.`@keystone-6/core@3.0.0 || 3.0.1` users that use `NODE_ENV` to trigger security-sensitive functionality in their production builds are vulnerable to `NODE_ENV` being inlined to `\"development\"` for user code, irrespective of what your environment variables. If you do not use `NODE_ENV` in your user code to trigger security-sensitive functionality, you are not impacted by this vulnerability. Any dependencies that use `NODE_ENV` to trigger particular behaviors (optimizations, security or otherwise) should still respect your environment's configured `NODE_ENV` variable. The application's dependencies, as found in `node_modules` (including `@keystone-6/core`), are typically not compiled as part of this process, and thus should be unaffected. We have tested this assumption by verifying that `NODE_ENV=production yarn keystone start` still uses secure cookies when using `statelessSessions`. This vulnerability has been fixed in @keystone-6/core@3.0.2, regression tests have been added for this vulnerability in #8063."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":9.8,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')"}]}]},"references":{"reference_data":[{"name":"https://github.com/keystonejs/keystone/security/advisories/GHSA-25mx-2mxm-6343","refsource":"CONFIRM","url":"https://github.com/keystonejs/keystone/security/advisories/GHSA-25mx-2mxm-6343"},{"name":"https://github.com/keystonejs/keystone/pull/8031/","refsource":"MISC","url":"https://github.com/keystonejs/keystone/pull/8031/"},{"name":"https://github.com/keystonejs/keystone/pull/8063","refsource":"MISC","url":"https://github.com/keystonejs/keystone/pull/8063"}]},"source":{"advisory":"GHSA-25mx-2mxm-6343","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2022-11-03 14:15:00","lastModifiedDate":"2022-11-04 16:08:00","problem_types":["CWE-74"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":9.8,"baseSeverity":"CRITICAL"},"exploitabilityScore":3.9,"impactScore":5.9}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:keystonejs:keystone:3.0.0:*:*:*:*:node.js:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:keystonejs:keystone:3.0.1:*:*:*:*:node.js:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":null,"notes":[]}}}