The whole concept of Google Tag Manager was that you could give marketing departments the ability to add "tags" to the website without having to involve engineering. That's how we got 10MB of javascript with every news article.
It also makes adding csp a nightmare. Your marketing department is putting in 30 trackers, changing monthly. And then there’s different countries for end clients with different TLDs for connect-src. You can’t possibly get anything locked down enough. That’s bad for security when you rely on csp for mitigating other factors.
The owners of the ad platforms end up dictating what data is used, they have the leverage and also marketing departments with power end up forcing engineering to use the audience tools Google and Meta provide. At least GTM gets blocked by ad-blockers.
We got 10MB of javascript (maybe 10 years ago...) because engineering needs to build one frontend with multi browser and multi screen support so they picked an off-the-shelf do-everything framework like Amber or Angular, or a react/redux build with 300 nested dependencies.
No, the 10MB (sometimes way more) of JavaScript for a damn news article has nothing to do with SPA frameworks (Angular) or libraries like React. It is tracking malware put there by marketing/advertising idiots.
What is that saying? A person will not understand something that their paycheck requires them to not understand.
That’s why it needs to become criminal for a website to serve malware, including through third party channels like ad networks and analytics services. Serving shit websites is no different than knowingly, or negligently, dumping toxic waste and should be treated the same.
If it's criminal for sites to accidentally serve malware, what does it mean for open source projects to accidentally get hit by supply chain attacks, or for them to get compromised by a rogue contributor (eg. xz)?
One could distinguish between criminal negligence and forgivable negligence in court. Unfortunately for GP that probably means you can't actually stick charges on anybody who serves malware via an ad network like this.
> A person will not understand something that their paycheck requires them to not understand.
I never really understood this idiom, because how can a PHB engineering manager (for example) be required to not understand their team's technology in order to retain their job? Surely if that manager knows their team's work inside out then they would be a more effective manager - which is good for everyone?
If I squint-my-brain, I can see how (for example) that anyone who works full-time as an SEO "consultant" in the year 2026 would only be if they actually believed that SEO tricks actually worked, which requires them to not understand how modern search-engines' spiders actually work (because it's my belief that "SEO" has been either nonsense bollocks - or a complete grift - since the mid-2010s). Am I close?
It's not the team's technology that's being referred to. It's about hazards. People whose job it is to do X have a hard time understanding that X shouldn't be done.
In this case, it's the dangers of the tracking and advertising frameworks being used for hostile purposes.
This stuff is so avoidable but unless we implement meaningful reprocussions things aren't going to change. There is no accountability.
In this case optimizely should have had better systems to spot a release like this (internal cool downs, check and balances, phased rolouts, automatic security checks). And sites that have massive user bases (cnn, bbc, etc..) have zero excuse to not have the same.
I would go so far as to say those sites should not be serving from vendors but should be vendoring their own scripts that they also are passing through security audits and serving them selves with cool downs.
How do these companies not have better dedication to protecting their users is beyond me.
This stuff is so avoidable but unless we implement meaningful reprocussions things aren't going to change. There is no accountability.
In this case optimizely should have had better systems to spot a release like this (internal cool downs, check and balances, phased rolouts, automatic security checks). And sites that have massive user bases (cnn, bbc, etc..) have zero excuse to not have the same.
I would go so far as to say those sites should not be serving from vendors but should be vendoring their own scripts that they also are passing through security audits and serving them selves with cool downs.
How do these companies not have better dedication to protecting their users is beyond me.
Feels nice knowing several years ago I worked on forcing CSP (including removing unsafe-eval) on some customers for a site builder product, as they have to manually whitelist domains which limits the impact of these sorts of attacks...
Yeah, honestly I wish they'd move that section higher up - it's probably he most genuinely useful tidbit in the article.
As an aside - I'm rabidly against "analytics" companies that come in and suggest that the right "getting started" choice is to drop untrusted JS they own (and can update at any time) onto your site.
It's "easy", but it completely breaks your security model.
If I were a lawyer... I'd be taking a serious look at putting optimizely into the meat grinder for recommending 'unsafe-eval' as a script source... it literally has "unsafe" in the fucking name for a reason. This alone should end the company. It won't, because this space is absolutely FILLED with scummy behavior, but it should.
---
A strict CSP is one of the most meaningful ways you have right now as a web developer to reduce attack surface. People should take advantage of it.
I think the kinds of people with "security models" are not the kinds of people with third-party analytics. They're marketing to people who want it to Just Work.
SRI helps you make sure the script you're loading is what you initially thought, but doesn't ensure that script doesn't load other scripts, no? You need CSP for that.
Specifying scripts by hashes is always a solid defense that platforms like this don't change their script after compromise - but in practice the whole point of optimizely and similar tools it that it's expected the script will change.
Common examples like analytics tools happily change their script bundles whenever they feel like it without just tagging a new version and letting you upgrade.
I remember a team at my old place bringing down the entire app with insufficient defense around an Optimizely script that failed. Seems bonkers to take on these dependencies and I think it's only going to get worse.
It's a feature. Changes to prod should always be reviewed and this fundamental incompatibility with insecurely hosted JavaScript is a signal that it is a bad idea.
Unfortunately, in this case the insecurely hosted JavaScript is the feature; that is, people who are not responsible for sites going down or breaches want to be able to add things nilly-willy (which therefore necessitates a way to bypass review).
In theory yes, in practice no since every SaaS wants to ship 5 times a day and add 15 new dependencies on other SaaS providers each release, and marketing wants to load gobs of 3rd party tracking and analytics code from their favorite SaaS of the day without having to get approval from those pesky security people. Let's not even mention ad networks.
Perhaps at last these unserious names will be abandoned as newsworthy failures become more common in the industry. Viz., gravitas may start to have obvious market value again.
These are not static scripts. Their content changes frequently. The customer is using them to inject dynamic content into their own sites. What you are describing would not work for this use case.
Every time one of these new attacks drops, you know there's a couple devs at OpenAI that look at each other and go, "This definitely wasn't us, right? ...right?" And how confident are they that out of Outlook, FAA, banks, and now Optimizely skimmer that none of them were either 1) agents up to some fuckery or 2) someone using their system to get up to some fuckery? It can't be 100% confident, right? ...right?
It's one of those sentences that seems like it's meaningful on first glance but that in reality conveys no information. For whatever reason LLMs are experts at cranking these sentences out.
Yes, AI is making it much easier to hack - you can just spin up a bunch of instances to look for vulnerabilities, you don't even need to do much manual work
tl;dr: Someone gained write access to the script Optimizely serves on its customers' websites, and they injected malware.
What is interesting is that the write access wasn't just for a single customer, but hundreds. So either tenancy isn't strong enough, or the level of access involved in the compromise was pretty severe.
Just stop using JS... If you control the server why not have the vendor have a server level integtration that way you are not serving any remote scripts. It would be interesting to do a study on how many of these compromise emnate from third party scripts and I am willing to bet it is over 90%
I hope folks are re-evaluating that now.
We got 10MB of javascript (maybe 10 years ago...) because engineering needs to build one frontend with multi browser and multi screen support so they picked an off-the-shelf do-everything framework like Amber or Angular, or a react/redux build with 300 nested dependencies.
That’s why it needs to become criminal for a website to serve malware, including through third party channels like ad networks and analytics services. Serving shit websites is no different than knowingly, or negligently, dumping toxic waste and should be treated the same.
Open source is already expensive from a time standpoint, you wanna make it expensive from a monetary standpoint too?
We should also enforce antitrust laws.
I never really understood this idiom, because how can a PHB engineering manager (for example) be required to not understand their team's technology in order to retain their job? Surely if that manager knows their team's work inside out then they would be a more effective manager - which is good for everyone?
If I squint-my-brain, I can see how (for example) that anyone who works full-time as an SEO "consultant" in the year 2026 would only be if they actually believed that SEO tricks actually worked, which requires them to not understand how modern search-engines' spiders actually work (because it's my belief that "SEO" has been either nonsense bollocks - or a complete grift - since the mid-2010s). Am I close?
In this case, it's the dangers of the tracking and advertising frameworks being used for hostile purposes.
I know we really like mass incarceration in America. But maybe start with civil liability and a private right to enforcement?
In this case optimizely should have had better systems to spot a release like this (internal cool downs, check and balances, phased rolouts, automatic security checks). And sites that have massive user bases (cnn, bbc, etc..) have zero excuse to not have the same.
I would go so far as to say those sites should not be serving from vendors but should be vendoring their own scripts that they also are passing through security audits and serving them selves with cool downs.
How do these companies not have better dedication to protecting their users is beyond me.
It doesn't cost them anything but a "whoops" post when they fuck up, so the incentive is misaligned (as you noted under repercussions).
The cost is externalised onto everyone else not them so it's not going to change.
Who cares? Next week you forget about this and move on
I would go so far as to say those sites should not be serving from vendors but should be vendoring their own scripts that they also are passing through security audits and serving them selves with cool downs.
How do these companies not have better dedication to protecting their users is beyond me.
Anyone knows what this might be? Can you jailbreak from safari on those versions?
[edit] From the other link, it seems to be Coruna and DarkSword exploits
Currently says "Partial Outage Affecting Recommendations Tracking and Reporting"
Sorry I had to say it ;-)
> Your origin can be clean while your visitors are robbed — the compromise sits in the tag layer.
“yeah load this JS m, but it can’t load / random other JS referencing sketchy places”
Feels nice knowing several years ago I worked on forcing CSP (including removing unsafe-eval) on some customers for a site builder product, as they have to manually whitelist domains which limits the impact of these sorts of attacks...
This writeup https://blog.report-uri.com/worlds-largest-brands-infected-w... has a section on how CSP helped (or didn't) in this attack.
As an aside - I'm rabidly against "analytics" companies that come in and suggest that the right "getting started" choice is to drop untrusted JS they own (and can update at any time) onto your site.
It's "easy", but it completely breaks your security model.
If I were a lawyer... I'd be taking a serious look at putting optimizely into the meat grinder for recommending 'unsafe-eval' as a script source... it literally has "unsafe" in the fucking name for a reason. This alone should end the company. It won't, because this space is absolutely FILLED with scummy behavior, but it should.
---
A strict CSP is one of the most meaningful ways you have right now as a web developer to reduce attack surface. People should take advantage of it.
There's a reason browser vendors now force basically all extensions into a strict CSP by default... https://developer.chrome.com/docs/extensions/reference/manif... They won't even let you manually relax it anymore.
Common examples like analytics tools happily change their script bundles whenever they feel like it without just tagging a new version and letting you upgrade.
I wish SRI could be used more,
https://x.com/tehlike/status/1432082161125888003 https://x.com/tehlike/status/1467033965215109122
Only followers this account has approved can see its posts.
Can't wait until they start killing hardware
Somehow this sentence immediately flags this article as AI slop.
What is interesting is that the write access wasn't just for a single customer, but hundreds. So either tenancy isn't strong enough, or the level of access involved in the compromise was pretty severe.
any program code should run on the webserver
browsers should be minimalist and only support html
First thing I add to my agents.md is do not use third party libraries, frameworks, fonts, icons, etc unless strictly necessary, ask first