CYBER LIBRARY
Explore the bootcamp
Adversarial thinkingIntermediate

Open redirects

An open redirect lets untrusted input choose an unintended navigation destination through a legitimate service.

3 min readUpdated 12 Oct 20263 connections
Markdown

What it means

An open redirect lets untrusted input choose an unintended navigation destination through a legitimate service. It can support phishing or interfere with authentication workflows that expect tightly controlled callback destinations. Prefer fixed destinations or validated identifiers mapped to approved routes.

A practical example

A login service accepts a return location. It maps a small set of permitted route names to local paths instead of forwarding an arbitrary supplied URL. Authentication callbacks follow their own exact registered destination rules.

What to check

Review redirects after login, logout, payment, and error handling. Validate destinations before navigation and test alternate encodings, scheme-relative URLs, and unexpected hostnames.

A common pitfall

Seeing the legitimate service's hostname at the start of a link does not prove that the eventual destination is trustworthy. The service may immediately forward the browser elsewhere.

Think it through

Why use route identifiers rather than arbitrary return URLs?

Answer: The application can map identifiers to destinations it owns and approves, reducing ambiguity in URL validation.

A trusted first hop can conceal an untrusted second hop

A fictional academy sends learners to their dashboard after login. If a return-location parameter accepts any destination, a link beginning with the academy's domain may lead immediately to another site. The initial hostname can lend credibility to a phishing message even though the final page is unrelated.

Navigation design should distinguish local application routes from external destinations. A route identifier such as dashboard or saved-notes can be mapped to a known path. Where external navigation is a real feature, define the permitted destinations and use one URL parser consistently. String prefixes and substring comparisons are fragile because URL syntax has multiple components and encoded representations.

Authentication flows deserve stricter treatment than ordinary convenience links. Registered callback destinations have a protocol role and should not inherit a broad redirect exception intended for marketing navigation. Likewise, an error handler or logout route can introduce a redirect that bypasses the carefully reviewed login route. Inventory the whole navigation lifecycle.

Review a return-location feature

Create a table for a fictional login service with three intended outcomes: the dashboard, an account settings page, and an explicitly approved partner portal. Explain how the application chooses each outcome without accepting an arbitrary supplied URL. Add an unknown route identifier and state the safe fallback.

When assessing an existing implementation, record the initial URL and final destination using controlled pages. Do not send deceptive links to real users. A strong report explains whether the redirect is simply undesirable navigation or part of a larger authentication or credential-exposure chain. The repair should preserve legitimate workflows while removing ambiguous destination selection, and tests should include both normal returns and prohibited destinations.

GO TO THE SOURCE

References & further reading

Original explanations, with primary references for deeper study.

OWASP: Unvalidated Redirects and Forwards
EXPLORE THIS IDEA’S CONNECTIONS

A small part of a bigger picture.

4 notes · 3 connections
100%
Open redirects · depth 1
Drag to pan · Pinch or use +/− to zoom · Click to preview · Double-click to read
Browse notes as a list (4)
FOLLOW ANOTHER THREADExplore the rest of the library
Start with a concept. Follow its connections.
Detection & responseAbuse Elevation Control MechanismElevation-control abuse bypasses or misuses mechanisms governing privileged execution.Making change happenAcceptance criteriaDefine observable conditions for a deliverable to be accepted.Security essentialsAccess controlUnderstand subjects, resources, permissions, and enforcement through a shared-drive example, including how access changes over time.Detection & responseAccess Token ManipulationAccess token manipulation changes or adopts operating-system security contexts.Risk & resilienceAccount Access RemovalAccount access removal disrupts legitimate users by changing, deleting, or restricting their identities.Evidence & investigationAccount DiscoveryAccount discovery enumerates identities available in a system or environment.Detection & responseAccount ManipulationAccount manipulation changes identity settings to preserve or expand access.Adversarial thinkingAcquire InfrastructureInfrastructure acquisition obtains domains, servers, or other resources used to support operations.Adversarial thinkingActive ScanningActive scanning probes target infrastructure to learn reachable services or weaknesses.Security essentialsAdversary in the middleAn intermediary may observe or alter a communication path.Security essentialsAESA symmetric block cipher whose safe use depends on its mode and implementation.Making change happenAgile deliveryUse short feedback cycles to adapt toward a useful outcome.