deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

Optimizely, Cursor and PyPI hit in one week of supply-chain attacks needing no victim code flaws

Three incidents in the week of November 16 — Optimizely script injection, a trojanized Cursor extension and a malicious PyPI package — compromised victims who never wrote vulnerable code.

Optimizely, Cursor and PyPI hit in one week of supply-chain attacks needing no victim code flaws

In the week of November 16 to 20, three separate supply-chain incidents let attackers reach organizations and developers who had not shipped a single line of flawed code. A write-up on dev.to, drawing on reporting from Infosecurity Magazine, The Hacker News and BleepingComputer, walks through the three attacks and the pattern connecting them.

JavaScript injected through Optimizely

According to Infosecurity Magazine, a flaw in Optimizely's experimentation platform allowed JavaScript injection into 188 snippets used by 178 organizations, including the BBC, CNN, Zoom and Salesforce. Because the payload was delivered from Optimizely's own CDN, it arrived with the provider's trust intact.

BleepingComputer reports that the tampered track.js served a stealer for crypto and payment data plus an iOS exploit to visitors of CNN, Fox News, the BBC, Salesforce, Zoom and GitLab. The dev.to write-up adds that the injected code swapped crypto wallet addresses and functioned as a card skimmer. The target in this case was the end user's money.

A stolen key reached Cursor's marketplace

The Hacker News reports that a key stolen from Fireworks AI, an inference provider, was enough to publish two trojanized versions of the Claude Code extension on Cursor's marketplace. The malicious listings stayed live for 11 hours, with up to 5,000 users exposed.

Here the target was the developer's toolchain. As the write-up points out, an extension running inside a code editor can read whatever the developer has open, and marketplace extensions can access the clipboard, files and environment variables.

A .pth stealer on PyPI

Two versions of the Microsoft agent-framework package, 1.26.1 and 1.26.2, were published 33 minutes apart on November 17 and installed a .pth file that launched a stealer every time Python started, according to The Hacker News. The package sees roughly 190,000 downloads a month.

The malware hunted for Azure, GitHub and Hugging Face tokens and, more significantly, queried IMDS, the instance metadata service on cloud machines, for fresh credentials. That detail turns a token theft into an infrastructure problem: IMDS hands temporary credentials to any process that asks from inside the machine, so code already running at Python startup has the same access as the legitimate application.

Patches landed, the trust model did not move

All three incidents were cleaned up with patches and package removals, but the underlying trust models stayed the same, the dev.to author argues. Optimizely's CDN kept serving third-party JavaScript to those 178 organizations. Cursor's marketplace kept accepting extensions published with a provider key. PyPI kept publishing new versions of a heavily downloaded package without human review.

The distinction the author draws is between patching and fixing. A patch closes one specific hole, but the trust model only changes when someone changes it deliberately, and that manual change rarely happens because it costs money and slows down deployments.

What to check on your side

  • Third-party scripts: inventory the external JavaScript your site loads from CDNs and enable Subresource Integrity. Without SRI, a change on the CDN is a change on your site.
  • Editor extensions: list which extensions your team's developers have installed and what permissions they hold.
  • Python environments: scan site-packages for .pth files and flag any that execute code rather than only adding import paths.

Why it matters

The common thread across the three incidents is asymmetry: the attacker compromised one link and inherited the trust granted to everything downstream, whether a CDN, a marketplace or a package index. None of the victims needed a code flaw to be hit, which means ordinary code review would not have caught any of this. The mitigations that do exist — SRI on external scripts, an extension inventory, a scan for executable .pth files — cost hours rather than an architectural overhaul, and they are the practical defense until marketplace and registry operators change how much trust a single compromised link can convey.

  • #supply-chain
  • #security
  • #pypi
  • #javascript
  • #developer-tools

Related posts