Vulnerabilities in pkg:npm/@keystonejs/keystone

PACKAGE
Advisory Identifier: GHSA-27g8-r9vw-765x
Advisory Summary

CVE-2021-32624 is a HIGH (CVSS 7.5) private field data leak vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting @keystonejs/keystone libraries in the npm ecosystem. The issue involves private field data leak. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@keystonejs/keystone

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@keystonejs/keystone. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-27g8-r9vw-765x CVE-2021-32624 HIGH Private Field data leak

CVE-2021-32624 at a Glance

CVE Identifier CVE-2021-32624
GHSA Identifier GHSA-27g8-r9vw-765x
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product @keystonejs/keystone
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2021-32624

To remediate this vulnerability, upgrade all affected @keystonejs/keystone dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@keystonejs/keystone fixed: Latest secure release
npm install @keystonejs/keystone@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @keystonejs/keystone

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2021-32624, inspect your project dependencies using npm:

npm ls @keystonejs/keystone

Analyze the terminal output to locate any version of @keystonejs/keystone in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The npm ls @keystonejs/keystone command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In @keystonejs/keystone, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

This security advisory relates to a newly discovered capability in our query infrastructure to directly or indirectly expose the values of private fields, bypassing the configured access control. This is an access control related oracle attack in that the attack method guides an attacker during their attempt to reveal information they do not have access to. The complexity of completing the attack is limited by some length-dependent behaviors and the fidelity of the exposed information. ### Impact Under some circumstances, field values or field value meta data can be determined, despite the field or list having `read` access control configured. If you use private fields or lists, you may be impacted. ### Patches None, at this time ### Workarounds None, at this time ### References None ### For more information For the protection of the community and private deployments, we think that the best course of action will be to not disclose further details on any open GitHub issues related to this advisory until a hot-fix or work-around has been deployed or published. If needed, you can email us at keystone@thinkmill.com.au

CVE-2021-32624 Affected @keystonejs/keystone Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
@keystonejs/keystone
npm
≤ 19.3.2

References

Frequently Asked Questions

What is CVE-2021-32624?
CVE-2021-32624 is a security vulnerability in @keystonejs/keystone involving Private Field data leak under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which @keystonejs/keystone versions are affected?
Affected versions include releases prior to current release patches across affected packages: @keystonejs/keystone.
What version fixes CVE-2021-32624?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is @keystonejs/keystone affected?
Yes, @keystonejs/keystone is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2021-32624?
CVE-2021-32624 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2021-32624?
CVE-2021-32624 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check npm dependencies for CVE-2021-32624?
Run the dependency tree command: 'npm ls @keystonejs/keystone'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-27g8-r9vw-765x",
  "modified" : "2021-05-25T20:20:03Z",
  "published" : "2021-05-27T18:39:03Z",
  "aliases" : [ "CVE-2021-32624" ],
  "summary" : "Private Field data leak",
  "details" : "This security advisory relates to a newly discovered capability in our query infrastructure to directly or indirectly expose the values of private fields, bypassing the configured access control.\n\nThis is an access control related oracle attack in that the attack method guides an attacker during their attempt to reveal information they do not have access to. The complexity of completing the attack is limited by some length-dependent behaviors and the fidelity of the exposed information.\n\n### Impact\n\nUnder some circumstances, field values or field value meta data can be determined, despite the field or list having `read` access control configured. If you use private fields or lists, you may be impacted.\n\n### Patches\n\nNone, at this time\n\n### Workarounds\n\nNone, at this time\n\n### References\n\nNone\n\n### For more information\n\nFor the protection of the community and private deployments, we think that the best course of action will be to not disclose further details on any open GitHub issues related to this advisory until a hot-fix or work-around has been deployed or published.\n\nIf needed, you can email us at keystone@thinkmill.com.au",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@keystonejs/keystone"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "19.3.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/keystonejs/keystone-5/security/advisories/GHSA-27g8-r9vw-765x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-32624"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-25T20:20:03Z",
    "nvd_published_at" : "2021-05-24T17:15:00Z"
  }
}