{"id":"CVE-2026-42565","aliases":["CVE-2026-42565","GHSA-vvvv-983w-r7pv"],"related":[],"kind":"vulnerability","state":"published","title":"@workos/authkit-session: Open Redirect via state-derived redirect target","summary":"@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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"@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.","source":"cvelist"},{"lang":"en","text":"An open redirect vulnerability exists in `AuthService.handleCallback` due to insufficient validation of the `returnPathname` value derived from the OAuth `state` parameter.\n\nThe `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.\n\nIf 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.\n\n**Security Impact**\nThis 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.\n\nThe severity depends on how `returnPathname` is used by the application. Exploitation requires:\n\n* The application to use `returnPathname` as a redirect target, and\n* The absence of downstream validation or allowlisting\n\nThis 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.\n\n**Vulnerability Type**\nCWE-601: URL Redirection to Untrusted Site (Open Redirect)\n\n**Patches**\nPatched in https://github.com/workos/authkit-session/releases/tag/v0.5.1","format":"markdown","source":"ghsa"},{"lang":"es","text":"@workos/authkit-session es un conjunto de herramientas para construir integraciones del framework WorkOS AuthKit. Antes de la versión 0.5.1, existe una vulnerabilidad de redirección abierta en AuthService.handleCallback debido a una validación insuficiente del valor returnPathname derivado del parámetro de estado de OAuth. El parámetro de estado se envía de ida y vuelta a través del proveedor de identidad (IdP) y puede ser influenciado por un atacante. La función handleCallback decodifica y devuelve returnPathname sin aplicar restricciones en el origen o el esquema. Como resultado, los valores controlados por el atacante pueden ser devueltos a la aplicación. Si este valor se utiliza directamente en una redirección, puede hacer que el usuario sea redirigido a un sitio externo controlado por el atacante. Esta vulnerabilidad está corregida en la versión 0.5.1.","source":"nvd"}],"published":"2026-05-05T18:42:26.000Z","modified":"2026-10-26T18:10:00.173Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"version":"< 0.5.1","status":"affected"}],"vendor":"workos","product":"authkit-session","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.5.1"}],"ecosystem":"npm","package":"@workos/authkit-session","purl":"pkg:npm/%40workos/authkit-session","source":"ghsa"}],"references":[{"url":"https://github.com/workos/authkit-session/security/advisories/GHSA-vvvv-983w-r7pv","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/workos/authkit-session/commit/f56e1d6214a93160759e5677b7a3d772b244db39","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/workos/authkit-session/releases/tag/v0.5.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42565","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/workos/authkit-session","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-12T16:30:19.568Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42565","url":"https://www.cve.org/CVERecord?id=CVE-2026-42565","licence":"CVE Terms of Use","modified":"2026-05-12T16:30:33.422Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vvvv-983w-r7pv","url":"https://github.com/advisories/GHSA-vvvv-983w-r7pv","licence":"CC-BY-4.0","modified":"2026-05-13T14:33:35.804Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42565","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42565","licence":"Public domain","modified":"2026-10-26T18:10:00.173Z"}],"updatedAt":"2026-11-25T22:59:21.250Z","epss":{"score":0.00194,"percentile":0.09492,"date":"2026-12-01T12:00:22.000Z"}}