CVE-2023-40027: @keystone 6/core When `ui.isAccessAllowed` Is `undefined`, The Vulnerability
MODERATECVE-2023-40027 is a MODERATE (CVSS 5.3) when `ui.isaccessallowed` is `undefined`, the vulnerability (CWE-862: Missing Authorization) affecting @keystone 6/core libraries in the npm ecosystem. The issue involves when `ui.isaccessallowed` is `undefined`, the `adminmeta` graphql query is publicly accessible. Remediation is available by upgrading affected packages to version 5.5.1.
CVE-2023-40027 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2023-40027
To remediate this vulnerability, upgrade all affected @keystone 6/core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @keystone-6/core@5.5.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @keystone-6/core
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2023-40027, inspect your project dependencies using npm:
npm ls @keystone-6/core
Analyze the terminal output to locate any version of @keystone 6/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.5.1), your application is affected.
Note: The npm ls @keystone-6/core 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-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. In @keystone 6/core, 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
CVE-2023-40027 Affected @keystone 6/core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@keystone-6/core
|
npm |
< 5.5.1
|
5.5.1
|
References
Frequently Asked Questions
What is CVE-2023-40027?
Which @keystone 6/core versions are affected?
What version fixes CVE-2023-40027?
Is @keystone-6/core affected?
What is the CVSS score of CVE-2023-40027?
What CWE is associated with CVE-2023-40027?
How can I check npm dependencies for CVE-2023-40027?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-9cvc-v7wm-992c",
"modified" : "2023-08-15T20:04:14Z",
"published" : "2023-08-15T20:04:14Z",
"aliases" : [ "CVE-2023-40027" ],
"summary" : "When `ui.isAccessAllowed` is `undefined`, the `adminMeta` GraphQL query is publicly accessible",
"details" : "### Summary\nWhen `ui.isAccessAllowed` is `undefined`, the `adminMeta` GraphQL query is publicly accessible, that is to say, no session is required for the query.\n\nThis is different to the behaviour of the default AdminUI middleware, which by default will only be publicly accessible if a `session` strategy is not defined. \n\n### Impact\nThis vulnerability does not affect developers using the `@keystone-6/auth` package, or any users that have written their own `ui.isAccessAllowed` (that is to say, you are unaffected if `ui.isAccessAllowed` is defined).\n\nThis vulnerability does affect developers who thought that their `session` strategy will, by default, enforce that `adminMeta` is inaccessible by the public in accordance with that strategy; akin to the behaviour of the AdminUI middleware.\n\n### Patches\nThis vulnerability has been patched in `@keystone-6/core` version `5.5.1`.\n\n### Workarounds\nYou can opt to write your own `isAccessAllowed` to work-around this vulnerability.\n\n### References\nPull request https://github.com/keystonejs/keystone/pull/8771\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@keystone-6/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.5.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/keystonejs/keystone/security/advisories/GHSA-9cvc-v7wm-992c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-40027"
}, {
"type" : "WEB",
"url" : "https://github.com/keystonejs/keystone/pull/8771"
}, {
"type" : "WEB",
"url" : "https://github.com/keystonejs/keystone/commit/650e27e6e9b42abfb94c340c8470faf61f0ff284"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/keystonejs/keystone"
}, {
"type" : "WEB",
"url" : "https://github.com/keystonejs/keystone/releases/tag/2023-08-15"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-862" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-15T20:04:14Z",
"nvd_published_at" : "2023-08-15T18:15:10Z"
}
}