Description
@workos/authkit-session is a toolkit for building WorkOS AuthKit framework integrations. Prior to 0.5.1, 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 may be returned to the application. If this value is used directly in a redirect, it may cause the user to be redirected to an external, attacker-controlled site. This vulnerability is fixed in 0.5.1.
Published: 2026-05-11
Score: 4.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

@workos/authkit-session is a framework for building WorkOS AuthKit integrations. Before version 0.5.1, the AuthService.handleCallback function lacks proper validation of the returnPathname value that is derived from the OAuth state parameter. The state is transmitted through the identity provider and can be manipulated by an attacker. The handleCallback method decodes this value and returns it without enforcing any origin or scheme restrictions. Consequently, maliciously crafted returnPathname values may be returned to the application and, if used directly for a redirect, this can lead an authenticated user to an external, attacker‑controlled website, exposing them to phishing or credential‑stealing attacks. The vulnerability is fixed in version 0.5.1.

Affected Systems

The affected product is the @workos/authkit-session library; all applications that depend on versions prior to 0.5.1 are impacted. No specific platform or OS details are listed, so any environment where this library is used may be vulnerable.

Risk and Exploitability

The CVSS score of 4.3 indicates a moderate severity. EPSS information is not available and the vulnerability is not listed in the CISA KEV catalog. The likely attack path involves an attacker manipulating the OAuth state value during authentication. If the application uses the unchecked returnPathname in a redirect, the user will be sent to a malicious site. The risk is therefore limited to the redirect handling code; no remote code execution or privilege escalation is possible.

Generated by OpenCVE AI on May 11, 2026 at 20:50 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the @workos/authkit-session library to version 0.5.1 or later.
  • Add origin and scheme validation to the returnPathname before performing any redirect to ensure it points to a trusted internal page.
  • Monitor authentication and redirect logs for unexpected redirect destinations that might indicate exploitation.

Generated by OpenCVE AI on May 11, 2026 at 20:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-vvvv-983w-r7pv @workos/authkit-session has an Open Redirect via state-derived redirect target
History

Tue, 12 May 2026 10:45:00 +0000

Type Values Removed Values Added
First Time appeared Workos
Workos authkit-session
Vendors & Products Workos
Workos authkit-session

Mon, 11 May 2026 19:30:00 +0000

Type Values Removed Values Added
Description @workos/authkit-session is a toolkit for building WorkOS AuthKit framework integrations. Prior to 0.5.1, 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 may be returned to the application. If this value is used directly in a redirect, it may cause the user to be redirected to an external, attacker-controlled site. This vulnerability is fixed in 0.5.1.
Title @workos/authkit-session: Open Redirect via state-derived redirect target
Weaknesses CWE-601
References
Metrics cvssV3_1

{'score': 4.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N'}


Subscriptions

Workos Authkit-session
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-12T16:30:33.422Z

Reserved: 2026-04-28T17:26:12.084Z

Link: CVE-2026-42565

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-05-11T20:25:42.640

Modified: 2026-05-11T20:25:42.640

Link: CVE-2026-42565

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-12T09:22:28Z

Weaknesses