CSS selectors can be used to exfiltrate data. This technique is particularly useful because CSS is often allowed in CSP rules, whereas JavaScript is frequently blocked. The attack works by brute-forcing a token character by character. Once the first character is identified, the payload is updated to guess the second character, and so on. This often requires an iframe to reload the page with the new payload. * `input[value^=a]` (prefix attribute selector): Selects elements where the value starts with "a". * `input[value$=a]` (suffix attribute selector): Selects elements where the value ends with "a". * `input[value*=a]` (substring attribute selector): Selects elements where the value contains "a".
Source: CSS Injection/README.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.