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.

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.

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 messagingSeparate example · incoming messageevil.exampleAttacker senderclient.exampleClient listenerExpected sender = https://auth.exampleevent.origin = https://evil.exampleMismatch → discard before processing responseReceiver address and sender identity are separate checks.

Key idea: Verify both ends of the browser message.

Terms

Look up a term in the glossary ↗

Rules & examples
  • 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.

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 § 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 ↗

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 ↗