Join our Newsletter — 33% off our NHI Course
Home› Glossary› Authentication, Authorisation & Trust› Wildcard Redirect URI
Authentication, Authorisation & Trust

Wildcard Redirect URI

← Back to Glossary
By NHI Mgmt Group Updated October 31, 2026 Domain: Authentication, Authorisation & Trust

A wildcard redirect URI allows multiple callback hosts to match a shared registration pattern, usually for dynamic environments such as review apps. The control is useful only when the domain is tightly owned and the wildcard scope is narrow enough to avoid shared-tenant exposure.

How Wildcard Redirect URIs Work

A wildcard redirect URI is a registration pattern that lets an authorization server accept more than one callback host under a controlled rule. It is mainly used for dynamic environments such as review apps, but the pattern only stays safe when the owning domain is tightly controlled and the matching scope is intentionally narrow.

The practical security question is not whether wildcard matching is convenient, but whether the redirect boundary remains predictable. When the match pattern is too broad, the redirect URI stops acting as a strong binding between a client and a specific callback location, which weakens one of the core protections in OAuth and OpenID Connect.

That is why wildcard use should be treated as an exception to precise redirect registration, not a default design choice. In secure deployments, the wildcard usually exists to support ephemeral subdomains or short-lived preview hosts while still preserving a bounded trust relationship for the callback flow.

Why Wildcard Redirect URIs Are Dangerous

The main risk is that the redirect endpoint becomes easier to abuse if an attacker can place content on a matching host, influence DNS, or register a lookalike callback under the same pattern. Once the authorization response can be steered to an attacker-controlled location, code or token theft becomes much easier.

Wildcard matching also increases the chance of accidental exposure across tenants, teams, or applications that share the same domain space. If the registration pattern is broader than the actual ownership model, one application's callback rules may unintentionally cover another application's host.

That is why precise redirect URI handling matters so much in OAuth. NHIMG’s Open Redirect Guide covers the adjacent abuse pattern where redirect handling is turned into phishing, authorization code theft, or token leakage, and it helps explain why exact matching is the safer default.

Where Wildcard Redirect URIs Fit in OAuth and OpenID Connect

In OAuth 2.0 and OpenID Connect, the redirect URI is part of the client binding that helps the authorization server send responses only to an expected destination. Wildcards weaken that binding, so they should only be used when the environment itself is tightly governed and the callback hosts are not shared with unrelated parties.

For that reason, wildcard redirect URIs are usually a design exception for controlled dynamic infrastructure, not a general-purpose convenience feature. They are most defensible when the host pattern maps to a domain the organisation fully owns and can monitor, and when the pattern cannot be widened by mistake.

NHIMG’s OAuth 2.0 and OpenID Connect Guide for Identity Teams explains the redirect URI’s role in the authorization code flow, while NHIMG’s OAuth 2.0 Security Best Current Practice Guide covers the move toward exact redirect URI matching and other controls that reduce callback abuse.

How Organisations Control Exposure

Exposure checking starts with inventory, because teams need to know which applications actually use wildcard redirect URIs and which domains they cover. That review should include DNS ownership, hosting model, and whether the callback host space is truly dedicated to the application using it.

It is also important to compare the registration rule with the real deployment pattern. If the wildcard exists only to save setup effort, or if a fixed redirect URI would work just as well, the safer option is usually to remove the wildcard and register exact callback values instead.

Organisations should also look for adjacent trust problems such as dangling subdomains, stale preview environments, or DNS records that outlive the application they were meant to support. NHIMG’s Subdomain Takeover Response Playbook is useful here because it shows how host control failures can turn an otherwise ordinary domain pattern into an access path.

Safer Design Patterns and Operational Trade-offs

The safest pattern is narrow ownership plus narrow matching. If wildcard redirect URIs are unavoidable, the scope should be as small as possible, limited to hosts that are created, controlled, and retired by the same team that owns the OAuth client.

That trade-off matters because the convenience of dynamic previews comes with a permanent monitoring burden. Teams need to make sure the wildcard does not become a standing exception that survives after the preview workflow has changed or the domain has been repurposed.

NHIMG’s OAuth Dynamic Client Registration Security Guide is relevant where host registration and client metadata are created dynamically, and NHIMG’s OAuth Client ID Metadata Documents Guide is useful when redirect-related trust is being shifted into metadata-driven client onboarding.

Risk and Threat Considerations

Wildcard redirect URIs create a broader attack surface because any weakness in host ownership, DNS hygiene, or environment isolation can redirect OAuth responses to an unintended destination. The danger is highest when the wildcard covers hosts that are easy to mint, easy to forget, or easy to repurpose.

Failure mechanism: An attacker or untrusted tenant gains control of a matching host, exploits a dangling DNS record, or abuses an overly broad pattern so the authorization response lands somewhere it should not.

Impact: Authorization codes, tokens, or session-linked responses can be stolen or replayed, which can lead to account compromise, phishing, or cross-tenant exposure.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP API Security Top 10 addresses the attack and risk surface, while NIST SP 800-53 Rev 5 and OWASP ASVS set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5IA-2 — Identification and Authentication (Organizational Users)Redirect URI binding protects user-authenticated OAuth flows and callback trust.
IA-5 — Authenticator ManagementWildcard redirects can expose codes and tokens that depend on secure credential handling.
AC-3 — Access EnforcementRedirect patterns enforce which callback destinations are permitted.
Recommendation — Enforce strong authentication for users entering OAuth flows and protect the callback boundary from misuse. Rotate and protect any credentials or tokens exposed through a compromised redirect path. Constrain permitted callback destinations to the narrowest enforceable pattern.
OWASP ASVSV10 — OAuth and OpenID ConnectOAuth redirect URI validation is central to secure OAuth/OIDC client registration.
Recommendation — Validate redirect URIs exactly and reject broad patterns unless the design absolutely requires them.
OWASP API Security Top 10API2 — Broken AuthenticationUnsafe redirect handling can undermine the authentication trust chain in OAuth flows.
Recommendation — Treat overly broad redirect matching as an authentication trust defect and remove it from exposed clients.

Practitioner Guidance

Why practitioners should care: Treat wildcard redirect URIs as a governance exception that needs explicit ownership, review, and expiry discipline. The control is only defensible when the domain is narrow, dedicated, and operationally monitored.

What to watch for: Review-app sprawl, shared subdomain space, and redirect rules that outlive the environment they were created for are the usual warning signs. If the callback pattern is broader than the actual deployment model, the registration should be tightened or removed.

Practitioner takeaway: Prefer exact redirect URI matching wherever possible, and allow wildcards only when the domain boundary is real, small, and continuously enforced.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 31, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org