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.

Related RFCs and changes

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

RFC 9700 · § 4.12DEFENSE
3 / 3
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
03
The client handles the authorization response.

The password remains outside the app.

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
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 ↗
KEY POINT

Do not forward a credential-bearing POST.

  • 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.
DETAILS

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.

Read the RFC section ↗

Diagrams simplify the RFC. Read the linked sections for complete requirements.

Privacy
All chapters in this RFC
  1. OAuth overview
  2. Authorization code + PKCE
  3. Retire unsafe grants
  4. Prevent token replay
  5. Limit token privileges
  6. Authenticate the client
  7. Metadata, TLS & CORS
  8. The attacker model
  9. Redirect URI validation
  10. Referer header leakage
  11. Browser history leakage
  12. Authorization server mix-up
  13. Authorization code injection
  14. Access token injection
  15. Cross-site request forgery
  16. PKCE downgrade
  17. Leakage at resource servers
  18. Misuse of stolen tokens
  19. Open redirection
  20. 307 credential forwarding
  21. TLS termination & proxies
  22. Refresh token protection
  23. Client as resource owner
  24. Clickjacking
  25. In-browser messaging
RFC 9700 / CHAPTERS

Chapters

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

RFC status and corrections ↗