Summary
OpenMetadata accepts a caller-supplied post-authentication redirect destination and appends a newly issued identity token to that destination. If a user follows a crafted link and completes authentication, the token and identity details may be sent to an attacker-controlled site, enabling account takeover.
Affected context
The vulnerability occurs in OpenMetadata SAML, OIDC, and OAuth2 login flows when a callback or redirect parameter is accepted from the request and stored for later use without being matched against an approved destination. The assertion consumer or identity handler then constructs a redirect containing the issued token and user information. Risk depends on users following attacker-controlled links and completing authentication through an affected flow.
Exploit preconditions
- Attack surface: SAML, OIDC, or OAuth2 post-authentication redirect handling
- Required access: Ability to send or induce a victim to follow a crafted authentication link; no prior OpenMetadata account access may be required
- Trigger point: Successful completion of the login flow after a caller-supplied redirect parameter has been stored
- Why exploitation is possible: The server trusts an unvalidated destination and includes a freshly issued token in the resulting redirect
Why this happens
The underlying bug is an open redirect combined with sensitive-token disclosure. A caller-controlled redirect value is treated as a trusted destination rather than being constrained to configured or registered endpoints. The authentication handler subsequently formats that value into a URL containing the issued JWT or identity token and user attributes, mapping to CWE-601: URL Redirection to Untrusted Site.
Potential impact
- An attacker-controlled site may receive a valid authentication token
- The attacker could use the token to make API requests as the victim
- A victim's OpenMetadata account could be taken over
- User identity details such as email address and name may be disclosed
- Applications or data accessible through the compromised account could be modified or exposed
General mitigation guidance
Mitigation generally focuses on removing caller control over authentication redirect destinations and preventing tokens from appearing in browser-visible redirect URLs.
Common defensive patterns include:
- Allowing only server-selected, pre-registered redirect destinations
- Comparing redirect targets against an exact allowlist rather than accepting arbitrary URLs
- Using a secure default destination when a callback value is absent or invalid
- Keeping access tokens out of query strings and other redirect-carried locations
- Binding authorization responses to the initiating client and request context
- Applying least privilege and short token lifetimes to reduce the impact of token exposure
- Treating redirect parameters as untrusted input throughout the full authentication flow
How teams detect issues like this
Organizations can identify similar issues through:
- Static analysis rules that trace request parameters into redirect responses
- Code review checks for redirect construction involving tokens, session values, or identity claims
- Tests that submit external, scheme-relative, encoded, and unexpected redirect destinations
- Policy enforcement requiring exact redirect-URI allowlists for SSO integrations
- Runtime monitoring for authentication responses that redirect to unregistered domains
- Automated security review tools that flag unvalidated redirect parameters and sensitive data in URLs

