Redirect following is the client behavior of automatically requesting the next URL returned in an HTTP redirect response. In security-sensitive server code, this can be dangerous because an apparently harmless fetch can be bounced to internal hosts, loopback services, or sensitive endpoints after the initial request leaves the application.
What redirect following means in practice
Redirect following is a client-side behaviour, but the security impact is often decided by the server that initiates the request. A safe-looking URL can return a redirect chain that sends the client to a different host, protocol, or network zone, so the real destination is not always the one the application intended to contact.
That distinction matters because many server-side fetch features trust the first URL only. If the client automatically follows redirects without policy checks, the request can be repurposed into a second, unintended outbound fetch.
Why redirect chains create security risk
The main danger is that redirect handling can cross a trust boundary after the initial request has already been authorised by the application. A redirect can point to an internal host, a loopback address, metadata service, or another sensitive endpoint, turning a benign lookup into server-side request forgery or data exfiltration.
Redirects can also conceal where traffic really goes, which makes allowlists, proxy rules, and destination logging less reliable if they only inspect the first hop. In practice, the risk is not the redirect itself, but the loss of control over the final destination.
When third-party content is involved, redirect following can also create a trust problem in outbound integrations. NHIMG’s OWASP API Top 10 API10 Unsafe Consumption of APIs Guide is useful here because it treats blind redirects, outbound validation, timeouts, allowlists, and provider trust as one control set.
How to control redirect behaviour safely
Secure handling starts by deciding whether redirects are needed at all. If a workflow does not require them, disable automatic following and treat every redirect response as untrusted input that must be evaluated explicitly.
When redirects are allowed, the client should validate the final destination, apply host and scheme restrictions, and enforce limits on hop count, response size, and request duration. That keeps a redirect chain from becoming an arbitrary outbound transport mechanism.
For broader control design, NIST SP 800-207 Zero Trust Architecture reinforces the same principle, verify the destination and trust posture at every step rather than assuming the original request target is still the one being reached.
Detection and review after a suspicious redirect
Redirect abuse is often easiest to spot in request telemetry. Look for unexpected 3xx responses, repeated hop chains, changes from public to private IP ranges, localhost or loopback destinations, unusual protocol switches, and outbound requests that do not match the application’s normal dependency set.
After patching or configuration changes, review logs for evidence that a redirect chain already reached a sensitive endpoint. If the application used embedded credentials, tokens, or signed requests during the fetch, assume those values may have been exposed to the final destination and review what was sent, not just where the request started.
For threat-hunting and attack-path mapping, MITRE ATT&CK Enterprise Matrix helps connect redirect abuse to later stages such as credential access, lateral movement, or internal reconnaissance.
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 and MITRE ATT&CK address the attack and risk surface, while NIST Zero Trust (SP 800-207) sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP API Security Top 10 | API10 — Unsafe Consumption of APIs | Redirect following can turn trusted outbound calls into unsafe third-party consumption. |
| Recommendation — Validate final destinations, limit redirects, and whitelist acceptable hosts before consuming external APIs. | ||
| NIST Zero Trust (SP 800-207) | SA-? — Zero Trust Architecture | Redirect chains break implicit trust in the original target and require destination verification. |
| Recommendation — Verify every hop and enforce destination policy before allowing outbound requests to proceed. | ||
| MITRE ATT&CK | T1189 — Drive-by Compromise | Redirect abuse is a common web-delivery mechanism that can lead to malicious destination access. |
| Recommendation — Correlate unexpected redirect chains with web-delivery indicators and investigate follow-on activity. | ||
Practitioner Guidance
Why practitioners should care: Redirect following is a small implementation detail with outsized consequences, because it can turn a controlled outbound request into an uncontrolled second request. The safest posture is to define a clear policy for when redirects are permitted, which destinations are acceptable, and what request data may be forwarded across hops.
What to watch for: If your application fetches URLs supplied by users, partners, or configuration, treat automatic redirect following as a default denial until you have explicit destination checks in place. The common mistake is assuming that first-hop validation is enough when the dangerous target is often the last hop.
Practitioner takeaway: The key question is not whether the first URL is safe, but whether the final destination remains inside your intended trust boundary.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
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.
Reviewed and updated by the NHIMG editorial team on October 30, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org