Skip to content

@workos/authkit-session has an Open Redirect via state-derived redirect target

Moderate severity GitHub Reviewed Published Apr 24, 2026 in workos/authkit-session • Updated May 5, 2026

Package

npm @workos/authkit-session (npm)

Affected versions

< 0.5.1

Patched versions

0.5.1

Description

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

References

@nicknisi nicknisi published to workos/authkit-session Apr 24, 2026
Published to the GitHub Advisory Database May 5, 2026
Reviewed May 5, 2026
Last updated May 5, 2026

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

EPSS score

Weaknesses

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. Learn more on MITRE.

CVE ID

CVE-2026-42565

GHSA ID

GHSA-vvvv-983w-r7pv

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.