I did not understand all: How did this land on the affected websites in the first place ?
Ad tracking pixel provider. Their solution was compromised
To make more money, the site owner allowed mystery-meat code to be loaded onto their payment page. Normally that code is effectively sandboxed, but the attacker figured out how to evade the sandboxing. The attacker only had to pay (via an intermediary) to get their payload onto the page.
It appears to vary. The table early in the article lists a few paths used on different e-commerce sites:
- “Altered Quorum* marketing pixel”
- “Edited Seers† cookie-banner setting”
- “Altered file on Revolve's own CDN”
The former two might be blocked by an ad blocker or JS blocker; the latter sounds trickier when the script comes from the vendor’s own compromised site.