In-browser messaging
25Browser 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.
DIAGRAM§ 4.17 ↗
RFC 9700 · § 4.17DEFENSE
3 / 3
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
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 ↗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.
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.
PrivacyAll chapters in this RFC
- OAuth overview
- Authorization code + PKCE
- Retire unsafe grants
- Prevent token replay
- Limit token privileges
- Authenticate the client
- Metadata, TLS & CORS
- The attacker model
- Redirect URI validation
- Referer header leakage
- Browser history leakage
- Authorization server mix-up
- Authorization code injection
- Access token injection
- Cross-site request forgery
- PKCE downgrade
- Leakage at resource servers
- Misuse of stolen tokens
- Open redirection
- 307 credential forwarding
- TLS termination & proxies
- Refresh token protection
- Client as resource owner
- Clickjacking
- In-browser messaging