VYPR
Moderate severityOSV Advisory· Published Jan 8, 2026· Updated Jan 15, 2026

Directus has open redirect in SAML

CVE-2026-22032

Description

Directus is a real-time API and App dashboard for managing SQL database content. Prior to version 11.14.0, an open redirect vulnerability exists in the Directus SAML authentication callback endpoint. During SAML authentication, the RelayState parameter is intended to preserve the user's original destination. However, while the login initiation flow validates redirect targets against allowed domains, this validation is not applied to the callback endpoint. This allows an attacker to craft a malicious authentication request that redirects users to an arbitrary external URL upon completion. The vulnerability is present in both the success and error handling paths of the callback. This vulnerability can be exploited without authentication. Version 11.14.0 contains a patch.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
directusnpm
< 11.14.011.14.0
@directus/apinpm
< 32.1.132.1.1

Affected products

1

Patches

1
dad9576ea936

Merge from fork (#26346)

https://github.com/directus/directusBrainslugDec 9, 2025via ghsa
2 files changed · +11 2
  • api/src/auth/drivers/saml.ts+6 2 modified
    @@ -19,9 +19,9 @@ import { AuthenticationService } from '../../services/authentication.js';
     import type { AuthDriverOptions, User } from '../../types/index.js';
     import asyncHandler from '../../utils/async-handler.js';
     import { getConfigFromEnv } from '../../utils/get-config-from-env.js';
    -import { LocalAuthDriver } from './local.js';
    -import { isLoginRedirectAllowed } from '../../utils/is-login-redirect-allowed.js';
     import { getSchema } from '../../utils/get-schema.js';
    +import { isLoginRedirectAllowed } from '../../utils/is-login-redirect-allowed.js';
    +import { LocalAuthDriver } from './local.js';
     
     // Register the samlify schema validator
     samlify.setSchemaValidator(validator);
    @@ -175,6 +175,10 @@ export function createSAMLAuthRouter(providerName: string) {
     
     			const authMode = (env[`AUTH_${providerName.toUpperCase()}_MODE`] ?? 'session') as string;
     
    +			if (relayState && isLoginRedirectAllowed(relayState, providerName) === false) {
    +				throw new InvalidPayloadError({ reason: `URL "${relayState}" can't be used to redirect after login` });
    +			}
    +
     			try {
     				const { sp, idp } = getAuthProvider(providerName) as SAMLAuthDriver;
     				const { extract } = await sp.parseLoginResponse(idp, 'post', req);
    
  • .changeset/empty-areas-lead.md+5 0 added
    @@ -0,0 +1,5 @@
    +---
    +'@directus/api': patch
    +---
    +
    +Added redirect validation
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

4

News mentions

0

No linked articles in our index yet.