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

In-browser messaging

25

Browser messaging changes the transport, not the trust rules. A wildcard recipient or unchecked sender can leak or inject a response.

Related RFCs and changes

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

RFC 9700 · § 4.17DEFENSE
3 / 3
In-browser messagingBrowser messaging changes the transport, not the trust rules. A wildcard recipient or unchecked sender can leak or inject a response. Current state: Reject a message from any other origin..In-browser messaging○ ○ ○auth.examplesender○ ○ ○client.examplerecipientexact targetOrigincheck event.originforeign origindiscard message
03
Reject a message from any other origin.

Keep transaction binding and the rest of § 2.1 protections in place.

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
WHAT CHANGED
RFC 6749 § 3.1.2RFC 9700 § 4.17.2

In-browser response transports must use exact trusted receiver and sender origins. Wildcard postMessage recipients are prohibited.

Read the updated RFC section ↗
KEY POINT

Verify both ends of the browser message.

  • Servers MUST exactly match pre-registered receiver origins and send only to trusted client origins. Wildcard target origins MUST NOT be used.
  • Clients MUST exactly compare the sender origin to the expected authorization-server origin to prevent injection.
  • All authorization-response protections in § 2.1 still apply to these communication flows.
DETAILS

The RFC covers three failures: wildcard receivers, insufficient receiver-URI validation, and missing sender-origin checks. A string that merely contains a trusted domain is not an exact origin match.

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 ↗