Visual RFC.
ALL RFCs / RFC 9700
Read the RFC ↗
RFC 9700 / ATTACKS & DEFENSES

307 credential forwarding

20

After a login POST, a 307 redirect preserves the method and body, potentially sending user credentials to the client.

RFC 9700 · § 4.12DEFENSE
3 / 3
03
The client handles the authorization response.

The password remains outside the app.

307 credential forwardingAfter a login POST, a 307 redirect preserves the method and body, potentially sending user credentials to the client. Current state: The client handles the authorization response..307 credential forwardingPOST /loginbody: username + password303 → GETGET at redirect targetno login request body

Key idea: Do not forward a credential-bearing POST.

Terms

Look up a term in the glossary ↗

Rules & examples
  • Authorization servers MUST NOT use HTTP 307 to redirect requests that may contain user credentials.
  • For HTTP redirection of such requests, servers SHOULD use 303 See Other.
  • 303 unambiguously rewrites POST to GET. 302 does not guarantee the same behavior.

This is about a specific HTTP behavior, not a broken encryption channel. Even an honest client should never receive a user’s authorization-server password through a redirected request.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A key is different from permission.

An app, a person, and a server have different roles. Follow who asks, who grants permission, and who checks the credential. A key in the drawing is an analogy, not a literal protocol field.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

What changed
RFC 6749 § 1.7RFC 9700 § 4.12

For redirects of potentially credential-bearing requests, HTTP 307 is prohibited and 303 is recommended to avoid forwarding the POST body.

Read the updated RFC section ↗

All chapters in RFC 9700

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗