Join our Newsletter — 33% off our NHI Course
Home› Glossary› Cyber Security› HTTP 307 Temporary Redirect
Cyber Security

HTTP 307 Temporary Redirect

← Back to Glossary
By NHI Mgmt Group Updated November 16, 2026 Domain: Cyber Security

HTTP 307 Temporary Redirect is a status code that tells a client to repeat the same request at a different URI. Unlike some older redirect codes, it preserves the original method and request body, so a POST stays a POST when resubmitted to the new location.

How HTTP 307 works

HTTP 307 Temporary Redirect tells the client to retry the same request at a different URI, while preserving the original method and request body. That makes it different from redirects that may switch a POST to a GET, because 307 is designed to move the request without changing its semantics.

In practice, 307 is a transport-level instruction, not a business decision. The server is telling the client that the resource is temporarily elsewhere, so the client should repeat the same operation against the new location rather than reinterpret it as a different request.

Why method preservation matters

The preservation of method and body is the defining feature of 307. For idempotent requests, that may feel routine, but for state-changing operations it is essential: a form submission, API write, or authenticated action should still arrive as the same kind of request after the redirect. That is why 307 is often chosen when request fidelity matters more than convenience.

This behaviour also reduces ambiguity for client developers and intermediaries. A redirect that changes request semantics can create subtle bugs, but 307 keeps the original intent intact, so the redirected target receives the same operation the user or application originally initiated.

Where HTTP 307 is used

Temporary redirects are commonly used when a service is being moved briefly, when traffic is being routed through a different host or endpoint, or when an application needs to preserve a request during a transition. The code signals that the new location should be treated as temporary, so clients should not rewrite their own assumptions about the original URI.

In security-sensitive flows, 307 can appear alongside login journeys, API gateways, reverse proxies, and app routing decisions. In those cases, the important issue is not just that the request is redirected, but that the original request body and method are preserved exactly as sent. The OAuth for Native and Mobile Apps Guide is a useful companion when redirect handling is part of an OAuth flow, because redirect URI handling and loopback redirects are material to how clients complete authorization. The Mobile Deep Link and App Link Security Guide is also relevant where redirects intersect with app links, universal links, and redirect URI handling.

HTTP 307 versus other redirects

HTTP 307 is best understood by contrast with redirect codes that do not guarantee method preservation. Its role is to preserve the request exactly while still steering the client to a different URI. That makes it especially useful when the server wants a temporary move without risking a semantic change to the request.

Because the code is temporary, it also communicates something about state. The original URI is still the canonical target in the long term, so clients and operators should treat the redirect as a short-lived routing decision rather than a permanent migration.

Risk and Threat Considerations

Redirects become security-relevant when they sit in authentication, token exchange, or request-forwarding paths. Because 307 preserves method and body, an attacker who can influence the target URI or intercept redirect handling may be able to preserve sensitive request content more faithfully than expected, especially in poorly validated redirect chains.

Failure mechanism: A trusted application or intermediary issues a temporary redirect to a destination that is not tightly controlled, and the client resubmits the same sensitive request body, credentials, or session-bound action to that location.

Impact: Sensitive data can be exposed, requests can be replayed against an unintended endpoint, and redirect handling can be abused to support phishing, token leakage, or request smuggling style abuse when surrounding controls are weak.

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, OWASP ASVS and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP API Security Top 10API8 — Security MisconfigurationRedirect handling and target validation directly affect API exposure and trust boundaries.
Recommendation — Validate redirect targets and preserve request semantics only across trusted endpoints.
NIST SP 800-53 Rev 5SC-23 — Session AuthenticityRedirect flows can affect request integrity and the authenticity of interactive sessions.
Recommendation — Protect redirect-driven sessions from tampering and validate the legitimacy of the receiving endpoint.
OWASP ASVSV12 — Secure CommunicationRedirects influence how sensitive requests move between endpoints during secure exchanges.
Recommendation — Enforce secure transport and reject redirect paths that weaken endpoint trust.
CIS Controls v8CIS-13 — Network Monitoring and DefenseMonitoring helps detect suspicious redirect chains and abnormal destination changes.
Recommendation — Monitor redirect behaviour for unexpected destination changes and anomalous request flows.

Practitioner Guidance

Why practitioners should care: HTTP 307 is safe only when the redirect target is expected, validated, and part of a deliberate flow. Treat it as a routing mechanism with security implications, not just a harmless status code, especially when the request contains credentials, state-changing payloads, or authorization-bearing data.

What to watch for: Review any 307 use in login, API, and mobile-app paths to ensure the redirected URI is controlled by the application, that clients do not follow untrusted destinations, and that the redirect is not being used where a permanent migration or a non-redirect pattern would be clearer.

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 November 16, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org