CVE-2023-34247: @keystone 6/auth @keystone-6/auth Open Redirect Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-jqxr-vjvv-899m
CVSS 6.1
CWE-601
Published
Advisory Summary

CVE-2023-34247 is a MODERATE (CVSS 6.1) @keystone-6/auth open redirect vulnerability vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting @keystone 6/auth libraries in the npm ecosystem. The issue involves @keystone-6/auth open redirect vulnerability. Remediation is available by upgrading affected packages to version 7.0.0.

CVE-2023-34247 at a Glance

CVE Identifier CVE-2023-34247
GHSA Identifier GHSA-jqxr-vjvv-899m
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product @keystone 6/auth
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

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

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

How to Fix CVE-2023-34247

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

@keystone-6/auth fixed: 7.0.0
npm install @keystone-6/auth@7.0.0
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 @keystone-6/auth

How to Check if You Are Affected

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

npm ls @keystone-6/auth

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

Note: The npm ls @keystone-6/auth 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-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In @keystone 6/auth, 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

### Summary There is an open redirect in the `@keystone-6/auth` package, where the redirect leading `/` filter can be bypassed. ### Impact Users may be redirected to domains other than the relative host, thereby it might be used by attackers to re-direct users to an unexpected location. ### Mitigations - Don't use the `@keystone-6/auth` package ### References - [CWE-601: URL Redirection to Untrusted Site ('Open Redirect')](https://cwe.mitre.org/data/definitions/601.html) - [OWASP: Unvalidated Redirects and Forwards Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) #### Similar Vulnerability Reports - [CVE-2023-0748](https://nvd.nist.gov/vuln/detail/CVE-2023-0748) - [CVE-2022-2252](https://nvd.nist.gov/vuln/detail/CVE-2022-2252) #### Credits Thanks to [morioka12](https://github.com/scgajge12) for reporting this problem. If you have any questions around this security advisory, please don't hesitate to contact us at [security@keystonejs.com](mailto:security@keystonejs.com), or [open an issue on GitHub](https://github.com/keystonejs/keystone/issues/new/choose). If you have a security flaw to report for any software in this repository, please see our [SECURITY policy](https://github.com/keystonejs/keystone/blob/main/SECURITY.md).

CVE-2023-34247 Affected @keystone 6/auth Versions

1 component(s)
Fixed Versions:
7.0.0
Product / Package Ecosystem Affected Versions Fixed Version
@keystone-6/auth
npm
< 7.0.0
7.0.0

References

Frequently Asked Questions

What is CVE-2023-34247?
CVE-2023-34247 is a security vulnerability in @keystone 6/auth involving @keystone-6/auth Open Redirect vulnerability under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which @keystone 6/auth versions are affected?
Affected versions include releases prior to 7.0.0 across affected packages: @keystone-6/auth.
What version fixes CVE-2023-34247?
Upgrading to 7.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @keystone-6/auth affected?
Yes, @keystone-6/auth is affected in releases prior to 7.0.0. Upgrade your dependency to 7.0.0 or later.
What is the CVSS score of CVE-2023-34247?
CVE-2023-34247 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:N.
What CWE is associated with CVE-2023-34247?
CVE-2023-34247 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check npm dependencies for CVE-2023-34247?
Run the dependency tree command: 'npm ls @keystone-6/auth'. 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-jqxr-vjvv-899m",
  "modified" : "2023-06-14T14:54:06Z",
  "published" : "2023-06-14T14:54:06Z",
  "aliases" : [ "CVE-2023-34247" ],
  "summary" : "@keystone-6/auth Open Redirect vulnerability",
  "details" : "### Summary\nThere is an open redirect in the `@keystone-6/auth` package, where the redirect leading `/` filter can be bypassed.\n\n### Impact\nUsers may be redirected to domains other than the relative host, thereby it might be used by attackers to re-direct users to an unexpected location.\n\n### Mitigations\n- Don't use the `@keystone-6/auth` package\n\n### References\n- [CWE-601: URL Redirection to Untrusted Site ('Open Redirect')](https://cwe.mitre.org/data/definitions/601.html)\n- [OWASP: Unvalidated Redirects and Forwards Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html)\n\n#### Similar Vulnerability Reports\n- [CVE-2023-0748](https://nvd.nist.gov/vuln/detail/CVE-2023-0748)\n- [CVE-2022-2252](https://nvd.nist.gov/vuln/detail/CVE-2022-2252)\n\n#### Credits\nThanks to [morioka12](https://github.com/scgajge12) for reporting this problem.\n\nIf you have any questions around this security advisory, please don't hesitate to contact us at [security@keystonejs.com](mailto:security@keystonejs.com), or [open an issue on GitHub](https://github.com/keystonejs/keystone/issues/new/choose).\n\nIf you have a security flaw to report for any software in this repository, please see our [SECURITY policy](https://github.com/keystonejs/keystone/blob/main/SECURITY.md).\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:A/AC:L/PR:L/UI:R/S:C/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@keystone-6/auth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/keystonejs/keystone/security/advisories/GHSA-jqxr-vjvv-899m"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-34247"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/keystonejs/keystone/pull/8626"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/keystonejs/keystone"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-14T14:54:06Z",
    "nvd_published_at" : "2023-06-13T17:15:14Z"
  }
}