CVE-2026-42565: WorkOS authkit-session open redirect in AuthService.handleCallback

CVE-2026-42565 · Severity: medium · CVSS 4.3 · Published 2026-05-11

A security vulnerability in the WorkOS AuthKit session library could allow attackers to redirect users to malicious websites. This occurs during the login process when the application fails to properly check the destination URL after authentication. An attacker could use this to trick users into visiting phishing sites that look like legitimate corporate login pages, potentially leading to credential theft or further social engineering attacks.

Vendors: npm, WorkOS.

Quick answers

Is CVE-2026-42565 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-42565 being exploited in the wild.
How severe is CVE-2026-42565?
Medium severity, with a CVSS score of 4.3, published 11 May 2026.
Which products and versions are affected?
@workos/authkit-session (npm) < 0.5.1, SEMVER:introduced=0,fixed=0.5.1; WorkOS AuthKit Session < 0.5.1.
Is there a fix for CVE-2026-42565?
Yes. @workos/authkit-session (npm): upgrade to 0.5.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-42565 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-42565?
Check whether you run @workos/authkit-session (npm) or WorkOS AuthKit Session at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @workos/authkit-session (npm): upgrade to 0.5.1 or later
    npm install @workos/authkit-session@0.5.1

Technical details

An open redirect vulnerability (CWE-601) exists in `AuthService.handleCallback` within the `@workos/authkit-session` package. The root cause is the insufficient validation of the `returnPathname` value, which is derived from the OAuth `state` parameter. Because the `state` parameter is round-tripped through the Identity Provider (IdP), an attacker can manipulate it to include arbitrary URLs. The `handleCallback` function decodes this value and returns it without enforcing origin or scheme restrictions. If the application uses this returned value directly in a redirect (e.g., via HTTP Location headers or client-side navigation) without downstream validation, a user can be redirected to an attacker-controlled domain. This issue is patched in version 0.5.1.

Affected products

  • WorkOS @workos/authkit-session < 0.5.1

Identifiers

  • CVE-2026-42565
  • GHSA-vvvv-983w-r7pv

Timeline

  • 2026-04-24: disclosed: Initial report/publication by maintainer
  • 2026-05-05: advisory: GitHub Advisory published
  • 2026-05-11: other: NVD published date

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.