Three supply chain breaks in one week, zero code written
Three doors, one pattern The week of November 16 to 20 left three incidents that share an uncomfortable property. None of them required the victim to write a single line of vulnerable code. The first came out of Op
Three doors, one pattern
The week of November 16 to 20 left three incidents that share an uncomfortable property.
None of them required the victim to write a single line of vulnerable code.
The first came out of Optimizely.
A flaw in its experimentation platform allowed JavaScript injection into 188 snippets across 178 organizations, including BBC, CNN, Zoom and Salesforce (Source: infosecurity-magazine.com).
The malicious code replaced wallet addresses, acted as a card skimmer and served iOS exploit kits. All of it from the provider's trusted CDN.
The second came through Cursor.
A key stolen at Fireworks AI, the inference provider, was enough to publish two trojanized versions of the Claude Code extension on the marketplace for 11 hours, with up to 5,000 users exposed (Source: thehackernews.com).
The third was on PyPI.
Two versions of the Microsoft agent-framework package, 1.26.1 and 1.26.2, published 33 minutes apart on November 17, installed a .pth file that launched a stealer on every Python startup (Source: thehackernews.com).
The package gets around 190,000 downloads a month.
What they stole and why the detail matters
In the PyPI case the stealer went after Azure, GitHub and Hugging Face tokens.
It also requested fresh credentials from IMDS, the instance metadata service on cloud machines.
That detail is what turns a token theft into an infrastructure problem. IMDS hands temporary credentials to any process that asks from inside the machine.
If the attacker already runs code at Python startup, it has the same access as the legitimate application.
In Optimizely the target was the end user's money.
The tampered track.js served malicious JavaScript on CNN, Fox News, BBC, Salesforce, Zoom and GitLab, with a crypto and payment data stealer plus an iOS exploit (Source: bleepingcomputer.com).
In Cursor the target was the developer's toolchain.
A trojanized extension in a code editor's marketplace has access to whatever the developer has open.
All three cases share the same asymmetry.
The attacker compromises one link and inherits the trust of everyone below it.
The lesson nobody is applying
All three incidents were resolved with patches and package removals, but none of the three was resolved by changing the trust model.
- Optimizely's CDN kept serving third-party JavaScript to 178 organizations.
- Cursor's marketplace kept publishing extensions with a provider key.
- PyPI kept accepting new versions of a package with 190,000 monthly downloads without human review.
My reading is that patching and fixing get confused here.
A patch closes the specific hole, but the trust model stays the same until someone changes it by hand.
And that manual change almost never happens because it costs money and, above all, slows down deployments.
What to look at
- Third-party script inventory. Check what external JavaScript your site loads from third-party CDNs and whether you have Subresource Integrity (SRI) enabled. Without SRI, a change on the CDN is a change on your site.
- Code editor extensions. List which extensions your team's developers have and with what permissions. A marketplace extension can read the clipboard, open files and environment variables.
- Python packages with .pth files. Look for .pth files in your environments' site-packages and check what they execute. A legitimate .pth only adds import paths, it does not launch processes.
How I would test it in my lab
I would set up a clean Python environment with a requirements.txt that includes a test package and check which .pth files appear in site-packages after installation.
Then I would write a script that walks site-packages and flags any .pth containing executable code beyond a path.
I would test it with the trojanized Microsoft agent-framework package on a virtual machine with no real credentials, just to see what the stealer tries to do at startup.
That gives me a cheap check I can repeat every time I update dependencies.
Closing
Three attacks in one week, three different vectors and one missing control.
The supply chain does not break because of a technical flaw, it breaks because nobody reviews the link that already has trust.
Originally published at https://sammideblas.com/notas/three-supply-chain-breaks-in-one-week-zero-code-written
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.
