Security pattern / case archive

postMessage Origin Validation Failure

A message receiver accepts data from an untrusted browser origin or window because it does not validate event.origin and event.source.

Common discovery signals
  • Client code registers a message event listener.
  • The handler uses event.data without an exact origin and source check.
  • Received data reaches an HTML or script-capable DOM sink.
Safe validation approach

Use a controlled sender page, a harmless marker, and a small browser-side effect. Stop when the receiver and sink are confirmed.

Related classifications

Related entries

Archive connections

Connected case files

01 record
CASE-020WEBVERSE
Connected evidence

RollWinded

Origin Validation Error / DOM XSS

The ScoreCast client accepted string messages without checking the sender origin or window. It then wrote the received string to innerHTML. A controlled sender opened the page, posted a small HTML payload, and changed the lab from unsolved to solved.