Polymarket Traders Lost $2.7 Million in Under an Hour to a Hijacked DebugBear Script — the Prediction Market Is Paying Out $3.9 Million and the Vendor Blames Its Registrar

Polymarket Traders Lost $2.7 Million in Under an Hour to a Hijacked DebugBear Script — the Prediction Market Is Paying Out $3.9 Million and the Vendor Blames Its Registrar

Polymarket Traders Lost $2.7 Million in Under an Hour to a Hijacked DebugBear Script — the Prediction Market Is Paying Out $3.9 Million and the Vendor Blames Its Registrar

On October 29, signed-in traders on the prediction market Polymarket watched their positions sell themselves at ever-worse prices and their funds move to a wallet that wasn't theirs. The cause was not a breach of Polymarket's own systems: the malicious code ran inside a page-speed script the site loaded from an outside company — DebugBear, whose real user monitoring (RUM) tool measures how fast pages load for real visitors. Blockchain records show crypto worth roughly $2.64 million reached the attackers' wallet in under an hour. Polymarket halted trading on its international platform the same day, and says it removed the compromised third-party provider "within the hour"; by November 2 the company was returning a total of $3.9 million to traders.

DebugBear has now shared its initial findings: "Our DNS server records were compromised through our domain registrar," the company said — attackers gained control of the vendor's DNS and served a malicious copy of the script from an address Polymarket's site already trusted. Researchers at Ohey found a different server answering for DebugBear's web addresses at 18:13 UTC while the malicious file was still online; earlier that day, the normal script had been served from Google Cloud Storage. Each DebugBear customer loads its own copy of the script, and the file that was swapped was Polymarket's — DebugBear's early findings indicate the attack targeted one customer's website specifically, though it has not named the customer, explained how registrar access was obtained, or found signs of a break-in to its own systems. Its advice to customers was immediate: remove the embed code.

The mechanism, reconstructed by Hudson Rock researchers who downloaded the malicious file on October 29 and reviewed it without running it, is a study in abusing what a site already trusts. The code reused the access of a signed-in trader in an open Polymarket page: it read the account details Polymarket keeps in the browser — including trading API keys — but those keys alone cannot place orders, because orders also need a wallet signature. So the script did something simpler and worse: it searched the page for the component that places orders and the signer that approves transactions, then took one of two paths. For accounts signed in with a crypto wallet, it moved positions straight to the attackers' wallet; for email-based accounts, it dumped positions at increasingly bad prices and moved the money out. In both paths the account's own signer approved the requests — and Hudson Rock found no part of the code that exfiltrates API keys, passwords, seed phrases, or private keys.

Polymarket's October 30 update put the direct damage at 726 affected wallets, about $2.7 million — all but 37 of them made whole at that point — and the company is also covering traders hurt by the trading halt or by positions the script forced out, paying out an additional $1.19 million across roughly 5,500 wallets, which brings the total reimbursement to $3.9 million. "We are in active investigation with law enforcement & will share a postmortem," the company said.

What Should You Do?

  1. Inventory every third-party script your site loads — you cannot secure an origin you have never listed; for each script, know the vendor, the exact origin it loads from, and who at that vendor controls its DNS and registrar account.
  2. Pin what you can, monitor what you can't — subresource integrity pins scripts with static files; for scripts that must change, monitor file hashes, watch for origin changes on vendor domains, and alert on new outbound destinations your pages talk to.
  3. Harden the registrar layer — at every company in the chain — registrar lock, DNSSEC, MFA on the domain and DNS accounts, and separate credentials for DNS management are the only controls that stop this specific attack; a hijacked registrar at your vendor is code execution on your page.
  4. Contain what in-page code can do — a Content-Security-Policy with a strict script-src and connect-src limits where injected code can load from and report to, so a compromised script at least cannot freely phone home.

The WAF Angle

This incident is the purest demonstration of a truth web teams keep relearning: your attack surface is every origin your page loads, not just your origin. The malicious JavaScript was served from the exact address the site already trusted, over a connection the browser had no reason to question, executed with the full rights of the page — the same structural weakness as a compromised ad tag or analytics snippet on any e-commerce site, except this time the "conversion" being stolen was money in a wallet instead of payment card data. A WAF cannot catch it because nothing about the request is an attack; the file arrived from the legitimate-looking origin, exactly as designed. What works instead is the integrity-and-allowlist discipline this incident begs for: SRI where files are static, CSP as damage limitation, continuous monitoring of third-party script content and the vendor's DNS posture — and, as we keep writing in incident after incident from the ConnectWise supply-chain compromise onward, treating your vendors' security controls as part of your own perimeter. Polymarket absorbed a $3.9 million lesson that the cheapest control on the list was a registrar lock at a vendor nobody thought of as part of the security boundary.

Sources