In-depth lesson · postMessage abuse
Root causes
Every point the postMessage abuse reports back under this heading, best-backed first, each with the reports it is seen in.
-
A message handler allowed reading a session token.
Seen in 23 reports
-
The handler did not check the origin of incoming messages at all.
Seen in 11 reports
-
The origin check used a substring or prefix match instead of an exact comparison.
-
Message data was passed directly to eval.
-
Message data was assigned to innerHTML without sanitisation.
Seen in 2 reports
-
An attacker-controlled URL from the message was assigned to location without scheme validation.
-
A pathname from the message was concatenated to the admin path without checking it stayed under the prefix.
Seen in 2 reports
-
A message handler allowed reading or writing cookies.
-
The origin check used a regular expression search where dots acted as wildcards.
Seen in 1 report
-
The origin check compared the message origin to the referrer, which the opener controls.
Seen in 1 report
-
The handler trusted any message from the window that opened the page.
Seen in 1 report
-
The handler validated the origin only on the first message and trusted later ones.
Seen in 1 report
-
The escaping routine skipped properties that are not own properties, such as a File object's name.
-
A path filter did not correctly reject an invalid protocol.
Seen in 1 report
-
A user-supplied target origin was used without a whitelist, allowing a wildcard.
Seen in 1 report
-
Attacker-controlled ajax parameters were passed directly to jQuery.ajax.
-
A route action allowed setting arbitrary model data that was rendered as HTML.
Seen in 1 report
-
A message field was inserted into the DOM without encoding.
Seen in 1 report
-
A sandboxed iframe combined allow-same-origin with a path traversal in a custom protocol.
Seen in 1 report
-
A message handler executed arbitrary calls on an analytics object.
Seen in 1 report
-
A message handler allowed invoking arbitrary methods by name.
Seen in 1 report
-
A message handler allowed loading an arbitrary script file as an extension.
Seen in 1 report
-
A message handler allowed injecting CSS into the page.
Seen in 1 report
-
A message handler allowed setting a map label with HTML.
Seen in 1 report
-
A message handler allowed setting an avatar URL parameter consumed by a widget.
Seen in 1 report
-
A message handler allowed a forged success message to win a race.
-
A message handler allowed a modal initialise message with an empty source.
Seen in 1 report
-
A message handler allowed a pushState message with an invalid protocol.
Seen in 1 report
-
A message handler allowed a call-popup redirect to an attacker domain.
-
A message handler allowed a WebSocket reconnect to leak a token.
Seen in 1 report
-
A message handler allowed reading files from a private repository.
-
A message handler allowed leaking the current user directory path.
Seen in 1 report
-
A message handler allowed reading contact form data.
-
A message handler allowed reading screenshots.
Seen in 1 report
-
A message handler allowed reading an OAuth code.
Seen in 1 report
-
A message handler allowed reading an OAuth access token.