{"schemaVersion":3,"id":"CVE-2022-39382","aliases":["GHSA-25mx-2mxm-6343"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2022-11-03T00:00:00.000Z","modified":"2025-04-22T16:08:20.892Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":9.8,"severity":"critical","version":"3.1","versionLabel":"v3.1","source":"CVE.org","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"CVE.org","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Npm","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":10,"impact":9.8,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":9.8,"severity":"critical","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.01653,"percentile":0.76195,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.032000000000000084,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.01621},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01653,"percentile":0.76195}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.01621,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.01653,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.01653,"percentile":0.76195}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"GITHUB_KEYSTONEJS_KEYSTONE","name":"Keystone","source":"github","url":"https://github.com/keystonejs/keystone/security/advisories/GHSA-6mhr-52mv-6v6f","maturity":"poc","reliabilityScore":0.3,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')","description":"The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.","type":"weakness","status":"Incomplete","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/74.html"}],"affected":[{"vendor":"keystonejs","product":"keystone","name":"keystone","label":"keystone","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 3.0.0, < 3.0.2","noFixRecorded":false,"fixedIn":null},{"text":"3.0.0","noFixRecorded":false,"fixedIn":null},{"text":"3.0.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 3.0.0, < 3.0.2 | 3.0.0 | 3.0.1","eol":null,"hubHref":"/vendor/keystonejs/keystone"},{"vendor":"@keystone-6","product":"core","name":"@keystone-6/core","label":"core","ecosystem":"Npm","cpePart":null,"purl":"pkg:npm/@keystone-6/core","purlType":"npm","versions":[{"text":"≥ 3.0.0, < 3.0.2","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 3.0.0, < 3.0.2","eol":null,"hubHref":null}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/keystonejs/keystone/security/advisories/GHSA-25mx-2mxm-6343","label":"github.com/keystonejs/keystone/security/advisories/GHSA-25mx-2mxm-6343","hostname":"github.com","tags":["WEB","Exploit","Third Party Advisory"]},{"url":"https://github.com/keystonejs/keystone/pull/8031/","label":"github.com/keystonejs/keystone/pull/8031/","hostname":"github.com","tags":["Patch","Third Party Advisory"]},{"url":"https://github.com/keystonejs/keystone/pull/8063","label":"github.com/keystonejs/keystone/pull/8063","hostname":"github.com","tags":["WEB","Patch","Third Party Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-39382","label":"nvd.nist.gov/vuln/detail/CVE-2022-39382","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/keystonejs/keystone/pull/8031","label":"github.com/keystonejs/keystone/pull/8031","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/keystonejs/keystone","label":"github.com/keystonejs/keystone","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2022-11-03T00:00:00.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-04-22T16:08:20.892Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":70,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T05:00:18.104Z","stale":false,"partial":false}}