GHSA-6mhr-52mv-6v6f

Suggest an improvement
Source
https://github.com/advisories/GHSA-6mhr-52mv-6v6f
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/10/GHSA-6mhr-52mv-6v6f/GHSA-6mhr-52mv-6v6f.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-6mhr-52mv-6v6f
Aliases
Related
Published
2022-10-18T17:12:46Z
Modified
2023-11-08T04:10:18.824607Z
Severity
  • 9.1 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N CVSS Calculator
Summary
Field-level access-control bypass for multiselect field
Details

Impact

@keystone-6/core@2.2.0 || 2.3.0 users who are using the multiselect field, and provided field-level access control - are vulnerable to their field-level access control not being used.

List-level access control is NOT affected.

Field-level access control for fields other than multiselect are NOT affected.

Example, you are vulnerable if you are using field-level access control on a multiselect like the following:

const yourList = list({
  access: {
    // this is list-level access control, this is NOT impacted
  },
  fields: {
    yourFieldName: multiselect({
      // this is field-level access control, for multiselect fields
      //   this is vulnerable
      access: {
        create: ({ session }) => session?.data.isAdmin,
        update: ({ session }) => session?.data.isAdmin,
      },
      options: [
        { value: 'apples', label: 'Apples' },
        { value: 'oranges', label: 'Oranges' },
      ],
      // ...
    }),
    // ...
  },
  // ...
});

Mitigation

Please upgrade to @keystone-6/core >= 2.3.1, where this vulnerability has been closed.

Workarounds

If for some reason you cannot upgrade your dependencies, you should stop using the multiselect field.

Credits

Thanks to Marek R for reporting and submitting the pull request to fix this problem.

If you have any questions around this security advisory, please don't hesitate to contact us at security@keystonejs.com, or open an issue on GitHub.

If you have a security flaw to report for any software in this repository, please see our SECURITY policy.

Database specific
{
    "github_reviewed": true,
    "cwe_ids": [
        "CWE-285",
        "CWE-863"
    ],
    "severity": "CRITICAL",
    "github_reviewed_at": "2022-10-18T17:12:46Z",
    "nvd_published_at": "2022-10-25T17:15:00Z"
}
References

Affected packages

npm / @keystone-6/core

Package

Name
@keystone-6/core
View open source insights on deps.dev
Purl
pkg:npm/%40keystone-6/core

Affected ranges

Type
SEMVER
Events
Introduced
2.2.0
Fixed
2.3.1