日本語 | English
- The target's
colorparameter lets us append arbitrary CSS properties to thestyleattribute of#main(CSS injection). We cannot leave thestyleattribute, so HTML and scripts cannot be injected. - Making
#maineditable with-webkit-user-modify:read-writemakes it focusable. When a cross-origin iframe navigates to the fragment#main, the scroll that accompanies the focus also scrolls the attacker page's scroll container that wraps the iframe. ItsscrollLeftgives the width of the first line inside the iframe as a number. - Narrowing the iframe by one character at a time shortens the first line by one character each time. We measure the width at every step and take the difference between neighbouring measurements to get each character's width. Matching these against a precomputed table of character widths recovers the 123-letter challenge. We then solve the PoW and POST it.
- The same CSS can be appended to the POST respo