The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-42565

CVE-2026-42565: WorkOS AuthKit Open Redirect Vulnerability

CVE-2026-42565 is an open redirect flaw in WorkOS AuthKit that allows attackers to redirect users to malicious sites through OAuth state manipulation. This post covers technical details, affected versions, and mitigation.

Published: May 18, 2026

CVE-2026-42565 Overview

CVE-2026-42565 is an open redirect vulnerability [CWE-601] in @workos/authkit-session, a toolkit for building WorkOS AuthKit framework integrations. The flaw resides in the AuthService.handleCallback function, which fails to validate the returnPathname value derived from the OAuth state parameter. Because the state parameter round-trips through the identity provider (IdP), an attacker can influence its contents. When the application uses the decoded returnPathname directly in a redirect, users can be sent to attacker-controlled external sites. The vulnerability affects versions prior to 0.5.1 and is fixed in 0.5.1.

Critical Impact

Attackers can craft OAuth flows that redirect authenticated users to external phishing or malware-hosting sites after successful login, enabling credential harvesting and social engineering attacks.

Affected Products

  • @workos/authkit-session versions prior to 0.5.1
  • Applications integrating WorkOS AuthKit via this session toolkit
  • OAuth callback handlers using AuthService.handleCallback

Discovery Timeline

  • 2026-05-11 - CVE-2026-42565 published to NVD
  • 2026-05-13 - Last updated in NVD database

Technical Details for CVE-2026-42565

Vulnerability Analysis

The vulnerability is an open redirect classified under [CWE-601]. The handleCallback function in AuthService decodes the returnPathname value from the OAuth state parameter and returns it without validating origin or scheme. Because state is reflected back from the IdP, an attacker who initiates the OAuth flow can embed a fully qualified external URL or a protocol-relative path (//evil.com) as the return path. When the consuming application emits this value in a Location header, the browser navigates to the attacker-controlled destination. Exploitation requires user interaction in the form of clicking a crafted authorization link.

Root Cause

The root cause is missing input sanitization on the returnPathname value. The function trusted the decoded payload as a same-origin relative path without enforcing that the value begin with a single / or stripping smuggled hosts, schemes, backslashes, or whitespace characters. Protocol-relative URLs of the form //attacker.example were not normalized and were forwarded verbatim to redirect logic.

Attack Vector

An attacker constructs an OAuth authorization URL containing a malicious returnPathname inside the state parameter. The victim authenticates legitimately at the IdP. On callback, the application invokes handleCallback, which returns the attacker-controlled path. The application redirects the user to the external site, where credential theft or malware delivery can occur under the trust context of the original application.

typescript
// Patch in src/utils.ts - sanitizeReturnPathname implementation
/**
 * Normalize an untrusted return-path candidate (e.g. decoded from OAuth
 * state) to a same-origin relative URL. The returned value always begins
 * with exactly one `/`, safe to emit directly as a `Location` header.
 */
export function sanitizeReturnPathname(
  input: unknown,
  fallback: string = '/',
): string {
  for (const candidate of [input, fallback]) {
    if (typeof candidate !== 'string' || candidate.length === 0) continue;
    try {
      const parsed = new URL(candidate, 'https://placeholder.invalid');
      const path = '/' + parsed.pathname.replace(/^\/+/, '');
      return `${path}${parsed.search}${parsed.hash}`;
    } catch {
      // Unparseable; try the next candidate.
    }
  }
  return '/';
}

Source: GitHub Commit f56e1d6. The patch parses each candidate against a throwaway origin so the WHATWG URL parser strips smuggled hosts, schemes, and control characters, then normalizes the leading slash to defuse protocol-relative redirects.

Detection Methods for CVE-2026-42565

Indicators of Compromise

  • OAuth callback requests where the decoded state.returnPathname contains absolute URLs, // prefixes, backslashes, or encoded control characters.
  • HTTP 302 responses from the application with Location headers pointing to external domains following an authentication callback.
  • Unusual referrer chains showing users transiting from the application's OAuth callback to unrelated external hosts.

Detection Strategies

  • Inspect application logs for callback handlers returning returnPathname values that do not begin with a single / followed by a path character.
  • Run software composition analysis against project manifests to flag installations of @workos/authkit-session below version 0.5.1.
  • Add a web application firewall rule that decodes the OAuth state parameter and blocks requests containing external hosts in the embedded return path.

Monitoring Recommendations

  • Alert on outbound redirects from authentication endpoints to domains outside an approved allowlist.
  • Track callback latency and error rates after deploying the patched version to identify regressions.
  • Correlate user reports of unexpected post-login navigation with callback URL telemetry.

How to Mitigate CVE-2026-42565

Immediate Actions Required

  • Upgrade @workos/authkit-session to version 0.5.1 or later across all environments.
  • Audit application code paths that consume the return value of AuthService.handleCallback and confirm none emit it directly into a Location header without validation.
  • Rotate any session secrets if logs indicate active exploitation attempts against the callback endpoint.

Patch Information

The fix is published in version 0.5.1 of @workos/authkit-session. The patch introduces a sanitizeReturnPathname utility that parses the candidate value with the WHATWG URL parser against a throwaway origin, strips any smuggled host or scheme, and forces the result to begin with exactly one /. Details are available in the GitHub Security Advisory GHSA-vvvv-983w-r7pv and the v0.5.1 release notes.

Workarounds

  • Wrap callback consumers with an application-level allowlist that rejects any returnPathname not matching ^/[^/\\].
  • Disable the use of returnPathname entirely and redirect all post-login traffic to a fixed safe path until the upgrade is deployed.
  • Configure a Content-Security-Policy with form-action 'self' and validate the Referer chain on sensitive endpoints to limit downstream abuse.
bash
# Upgrade to the patched version
npm install @workos/authkit-session@0.5.1

# Verify the installed version
npm ls @workos/authkit-session

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeOther

  • Vendor/TechWorkos

  • SeverityMEDIUM

  • CVSS Score4.3

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityNone
  • CWE References
  • CWE-601
  • Technical References
  • GitHub Commit Update

  • GitHub Release v0.5.1

  • GitHub Security Advisory GHSA-vvvv-983w-r7pv
  • Latest CVEs
  • CVE-2026-46333: Linux Kernel Privilege Escalation Flaw

  • CVE-2026-2586: Eclipse Glassfish RCE Vulnerability

  • CVE-2026-2587: Eclipse Glassfish RCE Vulnerability

  • CVE-2026-45255: FreeBSD bsdinstall/bsdconfig RCE Flaw
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English