CVE-2026-42565: @workos/authkit session @workos/authkit-session Has An Open Redirect Vulnerability

MODERATE
Advisory Identifier: GHSA-vvvv-983w-r7pv
CVSS 4.3
CWE-601
Published
Advisory Summary

CVE-2026-42565 is a MODERATE (CVSS 4.3) @workos/authkit-session has an open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting @workos/authkit session libraries in the npm ecosystem. The issue involves @workos/authkit-session has an open redirect via state-derived redirect target. Remediation is available by upgrading affected packages to version 0.5.1.

CVE-2026-42565 at a Glance

CVE Identifier CVE-2026-42565
GHSA Identifier GHSA-vvvv-983w-r7pv
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product @workos/authkit session
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.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:R/S:U/C:N/I:L/A:N).

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

How to Fix CVE-2026-42565

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

@workos/authkit-session fixed: 0.5.1
npm install @workos/authkit-session@0.5.1
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 @workos/authkit-session

How to Check if You Are Affected

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

npm ls @workos/authkit-session

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

Note: The npm ls @workos/authkit-session 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 @workos/authkit session, 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

An open redirect vulnerability exists in `AuthService.handleCallback` due to insufficient validation of the `returnPathname` value derived from the OAuth `state` parameter. The `state` parameter is round-tripped through the identity provider (IdP) and can be influenced by an attacker. The handleCallback function decodes and returns returnPathname without enforcing restrictions on origin or scheme. As a result, attacker-controlled values (e.g., `https://evil.com/`, `//evil.com`, or similar variants) may be returned to the application. If this value is used directly in a redirect (e.g., via an HTTP `Location` header, framework redirect helpers, or client-side navigation), it may cause the user to be redirected to an external, attacker-controlled site. **Security Impact** This issue may be used to facilitate phishing or user redirection attacks by leveraging the trust of the originating domain. For example, an attacker could craft a link that directs a user through a legitimate authentication flow and then redirects them to an external site. The severity depends on how `returnPathname` is used by the application. Exploitation requires: * The application to use `returnPathname` as a redirect target, and * The absence of downstream validation or allowlisting This vulnerability does not enable authentication bypass, token disclosure, or direct account compromise on its own, but may increase the effectiveness of social engineering attacks when combined with user interaction. **Vulnerability Type** CWE-601: URL Redirection to Untrusted Site (Open Redirect) **Patches** Patched in https://github.com/workos/authkit-session/releases/tag/v0.5.1

CVE-2026-42565 Affected @workos/authkit session Versions

1 component(s)
Fixed Versions:
0.5.1
Product / Package Ecosystem Affected Versions Fixed Version
@workos/authkit-session
npm
< 0.5.1
0.5.1

References

Frequently Asked Questions

What is CVE-2026-42565?
CVE-2026-42565 is a security vulnerability in @workos/authkit session involving @workos/authkit-session has an Open Redirect via state-derived redirect target under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which @workos/authkit session versions are affected?
Affected versions include releases prior to 0.5.1 across affected packages: @workos/authkit-session.
What version fixes CVE-2026-42565?
Upgrading to 0.5.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @workos/authkit-session affected?
Yes, @workos/authkit-session is affected in releases prior to 0.5.1. Upgrade your dependency to 0.5.1 or later.
What is the CVSS score of CVE-2026-42565?
CVE-2026-42565 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-42565?
CVE-2026-42565 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-2026-42565?
Run the dependency tree command: 'npm ls @workos/authkit-session'. 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-vvvv-983w-r7pv",
  "modified" : "2026-05-13T14:19:01Z",
  "published" : "2026-05-05T18:42:26Z",
  "aliases" : [ "CVE-2026-42565" ],
  "summary" : "@workos/authkit-session has an Open Redirect via state-derived redirect target",
  "details" : "An open redirect vulnerability exists in `AuthService.handleCallback` due to insufficient validation of the `returnPathname` value derived from the OAuth `state` parameter.\n\nThe `state` parameter is round-tripped through the identity provider (IdP) and can be influenced by an attacker. The handleCallback function decodes and returns returnPathname without enforcing restrictions on origin or scheme. As a result, attacker-controlled values (e.g., `https://evil.com/`, `//evil.com`, or similar variants) may be returned to the application.\n\nIf this value is used directly in a redirect (e.g., via an HTTP `Location` header, framework redirect helpers, or client-side navigation), it may cause the user to be redirected to an external, attacker-controlled site.\n\n**Security Impact**\nThis issue may be used to facilitate phishing or user redirection attacks by leveraging the trust of the originating domain. For example, an attacker could craft a link that directs a user through a legitimate authentication flow and then redirects them to an external site.\n\nThe severity depends on how `returnPathname` is used by the application. Exploitation requires:\n\n* The application to use `returnPathname` as a redirect target, and\n* The absence of downstream validation or allowlisting\n\nThis vulnerability does not enable authentication bypass, token disclosure, or direct account compromise on its own, but may increase the effectiveness of social engineering attacks when combined with user interaction.\n\n**Vulnerability Type**\nCWE-601: URL Redirection to Untrusted Site (Open Redirect)\n\n**Patches**\nPatched in https://github.com/workos/authkit-session/releases/tag/v0.5.1",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@workos/authkit-session"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.5.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/workos/authkit-session/security/advisories/GHSA-vvvv-983w-r7pv"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42565"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/workos/authkit-session/commit/f56e1d6214a93160759e5677b7a3d772b244db39"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/workos/authkit-session"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/workos/authkit-session/releases/tag/v0.5.1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-05T18:42:26Z",
    "nvd_published_at" : "2026-05-11T20:25:42Z"
  }
}