CVE-2022-39382
What it is
Keystone is a headless CMS for Node.js — built with GraphQL and React.`@keystone-6/[email protected] || 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/[email protected], regression tests have been added for this vulnerability in #8063.
At a glance
- Exploitability
- Can be exploited over the network without logging in. High risk of data exposure, data tampering, service disruption.
- Exploit odds
- 2.1% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 2.1% in the next 30 days (EPSS).
- Severity: 9.8 CRITICAL (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 2.1% · EPSS, next 30 days
- Weakness
- CWE-74
- Record status
- Modified
Affected
- Keystonejs Keystone 3.0.0
- Keystonejs Keystone 3.0.1
Attack profile CVSS 3.1 · 9.8
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2022-39382.md and follow it. Check whether this project is affected by CVE-2022-39382. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/keystonejs/keystone/pull/8031/
- https://github.com/keystonejs/keystone/pull/8063
- https://github.com/keystonejs/keystone/security/advisories/GHSA-25mx-2mxm-6343
- https://github.com/keystonejs/keystone/pull/8031/
- https://github.com/keystonejs/keystone/pull/8063
- https://github.com/keystonejs/keystone/security/advisories/GHSA-25mx-2mxm-6343
References
- https://github.com/keystonejs/keystone/pull/8031/
- https://github.com/keystonejs/keystone/pull/8063
- https://github.com/keystonejs/keystone/security/advisories/GHSA-25mx-2mxm-6343
- https://github.com/keystonejs/keystone/pull/8031/
- https://github.com/keystonejs/keystone/pull/8063
- https://github.com/keystonejs/keystone/security/advisories/GHSA-25mx-2mxm-6343