Attackers served malware from the websites of some of the world's largest brands...

@feross@infosec.exchange

Attackers served malware from the websites of some of the world's largest brands on November 16 without breaching any of them. They breached the A/B testing service those sites load.

A flaw in the service's account signup flow let the attacker write code into the optional Project JavaScript field. The service's own CDN then delivered it to visitors of every site running an affected snippet. Socket decoded a captured sample. It carries two modules:

• A wallet clipper that swaps Ethereum, Tron, and Bitcoin addresses in page text, form fields, and copied text
• A loader that pulls a second-stage script onto iOS devices

The vendor says it has patched the flaw, removed the injected code, revoked tokens, and reset access for affected accounts.

A third-party script tag is a dependency that runs with your page's full privileges. Unlike a package, it isn't pinned in a lockfile, and it can change without a deploy on your side.

Treat it like the rest of your supply chain. Know which vendors can run code on your pages, and keep experimentation and personalization scripts off checkout, login, and account pages. They don't need to be there.

socket.dev/blog/optimizely-sup