On 29 October 2026, traders on Polymarket watched positions and funds leave their accounts without approving anything they could see. The code doing it was not Polymarket's. It arrived in a file Polymarket loaded on every page from DebugBear, a website performance-monitoring company - the script DebugBear supplies for real-user monitoring. The file sat at the address it always had. Its contents had been swapped for a 15 KB wallet drainer. DebugBear says its DNS records were compromised through its domain registrar. Polymarket counts 726 affected wallets and about USD 2.7 million taken, and is returning USD 3.9 million in all.

Nothing here required breaking into Polymarket or DebugBear's servers. It required control of where one hostname pointed. This article follows the chain from that point to the money, and asks which of the usual front-end defences would have broken it. We also checked the certificate logs ourselves.

[INFO]
Primary sources: DebugBear's posts on X; Polymarket's posts on X; Hudson Rock's analysis of the captured script (InfoStealers, 29 October); Matt Kirkland of Ohey on the registry timing, as reported by Runtime Wire; Scott Helme's CSP findings as reported by Pasquale Pillitteri. The certificate and RDAP findings are our own checks on 2 November.
◈ interactive artifact
Where Would the Chain Break?
The trading page with Chrome DevTools open. Replay 29 October as reported, then switch on a registry lock, self-hosting, SRI, a sandboxed iframe or a signing prompt and see where, if anywhere, the drainer stops.

//The Script

Each DebugBear customer embeds its own copy of the monitoring script. Polymarket's was cdn.debugbear.com/C7xcKKrjUnXK.js. Hudson Rock retrieved it twice, at 18:12:06 and 18:13:04 UTC, and got the same 15,187 bytes both times. Scott Helme put the legitimate script at 60,493 bytes.

What it did, per Hudson Rock: read three keys from the browser's storage (polymarket.auth.params, polymarket.auth.proxyWallet, poly_clob_api_key_map); walk React's internal component tree to find the object holding Polymarket's trading methods (postOrder, createOrder, createMarketOrder); and use that object's signer. For ordinary wallet accounts it built an ERC-1155 batch transfer of the user's position tokens. For accounts using Magic, an embedded wallet, it placed sell orders at increasingly aggressive prices and then tried to move the proceeds. In both cases it built EIP-712 DepositWallet batch messages, asked the existing signer to sign them, and sent them through Polymarket's own relayer. A hard-coded fallback address received the funds, and the script reported wallet addresses, IP and country, operating system, account type, portfolio values and transfer results to data.debugbear.com. Hudson Rock found no routine that sent seed phrases or private keys anywhere. It did not need them.

Hudson Rock's summary is the right one: "The payload searches for the trading machinery the user has already authorized and tries to use it to move their assets." Once the code runs on the page, it is the page. This is the same lesson as the Binance theft the same evening at a much smaller scale: no key was taken, a legitimate signer was asked.

//Why the Defences in Place Did Not Fire

Polymarket had a Content Security Policy in enforcement mode. Helme recovered it from an archived copy of the home page from that morning. It allowed scripts from cdn.debugbear.com, and it allowed connections to data.debugbear.com and the other domains the drainer used. It had no reporting directive. A CSP names places a script may come from. It says nothing about what the file at that place contains, so a correct policy approved the swapped file. And because nothing was blocked, a report directive would have stayed silent too.

What would have refused the file is Subresource Integrity: an integrity hash on the script tag, which makes the browser reject any bytes that do not match. The catch is the reason most sites do not use it for vendor scripts: the vendor can no longer ship an update without the site changing the hash. The other options in the same family - serving a reviewed copy from your own domain, or running third-party code in a sandboxed frame on a separate origin away from the trading page - move control of what runs back to the site, at the cost of the vendor's convenience.

HTTPS did not help either. Whoever controls a domain's DNS can usually get a domain-validated certificate for it within minutes, because that is exactly what domain validation checks. We wrote about the same mechanism in the ccTLD registry hijacks. The padlock proves you reached the name, not the organisation you think runs it.

//What the Logs Show: Our Checks

Certificate Transparency. Using Cert Spotter's index on 2 November, we found a Let's Encrypt certificate for *.debugbear.com and debugbear.com with a validity start of 17:09:32 UTC on 29 October. Its embedded signed certificate timestamps put its submission to the logs at 18:08:03 and 18:08:04 UTC; Let's Encrypt backdates the start of validity by an hour. A wildcard certificate needs a DNS-based challenge, so whoever requested it could edit the domain's DNS at 18:08. On 30 October at 17:49 UTC a Cloudflare-issued wildcard (SSL.com, "Cloudflare TLS Issuing ECC CA 4") followed.

What that does and does not show. The 18:08 certificate was issued after Polymarket's removal build (17:59:20 UTC), so it is not the certificate that served the drainer to traders, and we found no other certificate for those names issued that day. Let's Encrypt is also one of the CAs Cloudflare uses, so it could be DebugBear's own recovery rather than the attacker's. The log cannot tell us who asked for it. crt.sh had not indexed either certificate when we checked; Cert Spotter had.

Registration. DebugBear has not named its registrar. The .com registry's RDAP record lists NameCheap, Inc., with the domain's record last changed at 23:17:53 UTC on 1 November and status "client transfer prohibited" only - no registry lock. That is the registrar of record, not a finding that the registrar itself was breached. An account takeover at a registrar looks the same from outside. Kirkland reports that the registry record changed nine minutes before DebugBear's script host began failing and 25 minutes before the first funds reached the drainer's wallet; what changed has not been published.

//Timeline and Response

Hudson Rock notes a server-supplied Last-Modified of 27 October on the malicious file and does not treat it as the start of the attack. Polymarket entered cancel-only mode around 18:00 UTC and resumed trading about an hour later, per Hackread. Polymarket says it removed the compromised provider "within the hour". DebugBear told every RUM customer to remove its embed code on 29 October, then said its "DNS server records were compromised through our domain registrar", that it could not receive email at its domain, that the attack "targeted the website of a specific customer", and that it had seen no sign its internal systems were compromised.

Polymarket says 689 of 726 affected wallets were refunded in full by its update, and it is paying another USD 1.19 million to about 5,500 wallets for losses during the trading pause - USD 3.9 million in total, with no claims needed. It has referred the case to law enforcement and promised a postmortem. This was its second vendor-script incident of the year; in June, injected front-end code took about USD 3 million.

Not the same incident: on 30 and 31 October Blockaid flagged DNS hijacks of twelve other crypto sites, redirecting visitors to a wallet drainer; Kintsu described it as happening "at the registrar level". CircleID reports no established link - attacker, registrar or cause - to DebugBear.

//What to Take From It

For sites: list every script that runs on pages where users hold money or sessions, and for each decide which is true - its bytes are pinned (SRI), it is served from your domain after review, or it runs isolated from the sensitive page. "We allowlisted the host" is not on that list. A monitoring script is as powerful as your own code.
For script vendors: your domain is your customers' attack surface. Registry lock, strong and phishing-resistant authentication at the registrar, and alerts on nameserver and record changes are the minimum.
For wallet designs: where signing happens without a visible prompt, code on the page can sign. That is a property of the design, not of this attacker.

[IOC]
Script: cdn.debugbear[.]com/C7xcKKrjUnXK.js, 15,187 bytes, SHA-256 0755e767504d8103f6c27b9e765a1026507a17c04513242adb503df7777879e5 (Hudson Rock)
Exfiltration: data.debugbear[.]com/metrics/submit, /metrics/update, /metrics/handle; config /metrics/init
Fallback recipient: 0x3F99139F1C5854bb628c2e576Aaf638e99dFfc18
Storage keys read: polymarket.auth.params, polymarket.auth.proxyWallet, poly_clob_api_key_map
Certificate (our check): Let's Encrypt YE1, *.debugbear.com, logged 18:08 UTC 29 Oct, SHA-256 684bf11322b411cd14bf2de9192ea0bb0702cc6cbcf2c79febc30267f37fdae2, not revoked when checked
Action for any DebugBear RUM customer: remove the embed, per DebugBear

//Sourcing and Uncertainty

The script's URL, size, hash, behaviour, endpoints, fallback address, retrieval times, the removal build timestamp and the Hudson Rock quotes are from Hudson Rock's InfoStealers write-up. DebugBear's statements are from its posts on X. The 726 wallets, refunds and "within the hour" are from Polymarket's posts on X; Hackread reports 710 wallets from third-party trackers, the cancel-only times and the June incident. Kirkland's registry timing is as reported by Runtime Wire, which does not describe independent verification. The CSP contents, the missing report directive and the 60,493-byte figure are Helme's, as reported by Pasquale Pillitteri; we have not read Helme's original. The twelve-site campaign is from CircleID. The certificate details are from Cert Spotter's API and the certificates' own SCTs, decoded locally; the registration details are from Verisign's RDAP service. Both were checked on 2 November.

What is unknown. How the DNS was changed - registrar account or registrar systems - and by whom. How the drainer was served over HTTPS before 18:08 UTC; we found no certificate that answers that. Whether Polymarket's promised postmortem changes any of the above; it had not been published when this was written.