Executive summary
In the last week of October 2026, three unrelated incidents shared one feature: the harmful code was never in the victim's own repository. A hijacked page-speed script drained about $2.6 million from Polymarket traders. A counterfeit Claude Code extension spent eleven hours in Cursor's marketplace. A hosting platform, Northflank, told customers to treat every stored secret as decrypted. In each, the organisation's own controls were sound and the exposure came from something it trusted by default. This paper proposes a simple discipline, the borrowed-authority register, for finding and constraining third-party code that runs with your users' or your developers' privileges. It is written for security, platform and product leaders, and is deliberately short on tooling.
1. Three incidents, one pattern
Polymarket. As reported on 1 November, malicious code replaced Polymarket's copy of a DebugBear monitoring script after DebugBear's DNS records were compromised through its registrar. It found the page's order-placing code and signer and used the signed-in user's own authority to move or sell positions. Hudson Rock's analysis found no routine that exfiltrated keys or seed phrases. It did not need one.
Cursor. BleepingComputer reported that a trojanised extension posing as Anthropic's Claude Code plugin, version 2.1.313, was live on Cursor's marketplace for about eleven hours on 29 October, exposing up to 5,000 developers. A loader added an SSH key, tried to enable SSH and set up persistence. The backdoor largely failed, through small errors in how it called system tools on macOS and Windows, yet it still reported usernames, hostnames, public IPs, git emails and the names of sensitive environment variables back to the attacker. Cursor shut its marketplace to audit it.
Northflank. According to BleepingComputer, the platform told customers to assume all environment variables had been decrypted, and several then reported unauthorised use of AI API keys. Wiz links the case to at least nine incidents at AI development platforms in October.
2. What the three have in common
None required defeating the victim's authentication. Each exploited borrowed authority: privileges that a user, a developer or a workload holds, and that some piece of code the organisation did not write is allowed to exercise. The trader's session, the developer's workstation and the platform's secret store are all places where authority is concentrated and where outside code is invited in.
That has an uncomfortable implication for budgets. Spend on perimeter and identity assurance protects the moment of login. These incidents happened after it.
3. The borrowed-authority register
Create one table, owned by a named person, with one row for every place third-party code runs inside a privileged context. Four contexts cover most of the ground:
- Authenticated browser pages. Analytics, session replay, chat, tag managers, performance monitoring, payment widgets.
- Developer environments. IDE extensions, editor plugins, coding-agent skills and MCP servers, package install scripts.
- Platforms holding secrets. Hosting, CI, notebook and AI development services that store environment variables and keys.
- Vendor-managed domains and DNS. Anything where a supplier's registrar account decides what your users receive.
For each row record what authority the code can reach, who approved it, how it is pinned or verified, how fast it can be removed, and the worst realistic outcome in money and in records. Rank by worst outcome, not by vendor size. A monitoring script on an account page can matter more than an expensive platform on a back-office server.
4. Constraints, in order of value
Remove. Delete everything that is not earning its place on privileged pages. This is the cheapest control and the one most often skipped, because each script has a sponsor.
Verify. Pin versions, use Subresource Integrity where the vendor permits, and keep a private mirror of extensions your developers rely on. An allow-list of a CDN does not verify the files it serves.
Contain. Sandbox what remains. Keep outside code in isolated frames or workers on pages that sign or pay, require a user-readable confirmation for high-value actions, and give developer tools no standing secrets: short-lived credentials issued per task, with spending caps on AI provider keys.
Detect. Watch for changes in the files that load, not only in your code: hash the third-party scripts served to a test browser every few minutes and alert on difference. Watch for new SSH keys and unusual outbound connections from developer machines.
Recover. Practise removing a vendor's code in minutes and rotating every credential on a platform in an afternoon. Polymarket's removal inside the hour and Northflank's rotation tooling are what limited damage in both cases.
5. Asking suppliers the right questions
A security questionnaire rarely reaches the question that mattered in Polymarket's case, which is who can change a supplier's DNS. Ask for registrar lock, DNS change controls and multi-party approval, whether customer-specific files are generated or shared, how a customer is told about a compromise, and what the supplier can do to withdraw a file fast. Put the notification time in the contract.
6. Limits
A register will not catch a supplier that is compromised in a way nobody can see, and the first hour of every incident here was spent working out what was happening. Containment also costs convenience: removing a heatmap tool will annoy someone. And three incidents in a week is anecdote, not a statistic; Polymarket itself reported an earlier third-party script incident in June, which suggests repeat exposure is common rather than rare. We have written the controls above to be useful even if the specific attack styles change.
Conclusion
If your security model stops at the login, it stops too early. The code that runs after the login, in browsers, editors and hosting platforms, holds the same authority as your users, and someone other than you decides what it says. Writing it down is the first step. We can facilitate a half-day register workshop with your security, platform and product teams: sales@halfteck.com.
Sources: The Hacker News, 1 November 2026; Hudson Rock; BleepingComputer, 30 October 2026; BleepingComputer, 31 October 2026; SecurityWeek, 30 October 2026.