Nov 03, 2026 · 7 min read
Polymarket's $3.9M Refund: Inside the Vendor Script Drain
On October 29, 2026, an attacker swapped a performance monitoring script loaded on polymarket.com for a wallet drainer. Polymarket says it is returning $3.9 million to traders. The vendor, DebugBear, says the break in came through its domain registrar.
Nobody stole a password here. Nobody phished a seed phrase. Victims just had the site open in a browser tab while a script Polymarket trusted ran with their logged in session. That is the uncomfortable lesson: on a modern web app, every third party script runs with the same powers as the site's own code.
Key Takeaways
- Polymarket is returning $3.9 million: $2.7 million for the theft and $1.2 million for losses during the trading pause, according to its postmortem.
- DebugBear, the performance vendor whose script was replaced, says its DNS records were compromised through its domain registrar and that it could not receive email sent to its domain.
- Hudson Rock's analysis of the malicious file found code that read session data from local storage, hooked into the page's live trading client, and requested signatures to move positions and funds.
- Polymarket says no claims or tickets are needed for refunds, so any email asking you to "claim" a Polymarket refund should be treated as phishing.
- This is Polymarket's second front end compromise of 2026, after a roughly $3 million theft in June.
What Happened to Polymarket on October 29?
A third party performance monitoring script on polymarket.com was replaced with malicious code that targeted Polymarket users. Polymarket's status page says "The attacker replaced the script with one built to target Polymarket users," and that for some people who had the site open, it "used their active session to sell positions and move funds out of their wallet."
The timeline, in UTC:
- 5:38 PM, Oct 29: Polymarket flags "unauthorized activity affecting user wallets." The web app and login go into a major outage.
- 5:59 PM: A production build removing the DebugBear RUM script is timestamped, per Hudson Rock.
- 6:06 PM: Polymarket marks the incident resolved, though trading stayed paused for hours.
- Oct 30, 8:07 PM: Postmortem published.
Polymarket removed the script, cleared caches, paused trading and its relayer, and reset all active login sessions. It has not given a victim count. Bankless reports 726 wallets were hit, with a median loss of $171, and that four accounts losing more than $100K each made up 43% of the haul, citing Bitquery. The separate $1.19 million covers roughly 5.5K wallets hurt by the pause.
How Did a Monitoring Script Drain Wallets?
The script did not need to break anything, because the browser already trusted it. Hudson Rock's static analysis of the file, C7xcKKrjUnXK.js served from DebugBear's CDN, describes a patient routine: Weeks later, the same pattern hit 178 brands at once when attackers slipped malware into Optimizely snippets.
- Read the session. It pulled auth context, the deposit wallet address and an API credential map out of local storage.
- Borrow the app's own client. It "traverses React's internal component structures" to find the live trading client and its signer.
- Pick targets. It checked the portfolio against thresholds and quit if Polymarket's geoblock marked the visitor as blocked.
- Move the money. For regular wallets it built a batch transfer of position tokens. For Magic login accounts it placed sell orders at steadily worse prices, then tried to move the proceeds through Polymarket's relayer.
- Phone home. It reported wallet and portfolio data to endpoints dressed up as DebugBear metrics URLs.
Hudson Rock found no routine that sent passwords, seed phrases or private keys. It did not need them. The attack worked at the layer above keys: the logged in page.
How Did the Attacker Get the Script?
DebugBear says the attacker went through its domain registrar, not its servers. In an October 30 post, it wrote: "Our DNS server records were compromised through our domain registrar. We are currently unable to receive emails sent to our domain." It added that the attack "targeted the website of a specific customer" and that it had seen no sign its internal systems were breached.
That detail matters. Control of DNS means control of where cdn.debugbear.com points. Serve a different file from the same hostname and every site that loads it runs the new code. Scott Helme of Report URI argued, as paraphrased by Bankless, that Polymarket's Content Security Policy allowlisted every domain the drainer touched, and that pinning the script to a known hash would have stopped the swapped file from running. That pin is Subresource Integrity, a W3C standard: the browser refuses any file whose hash does not match.
What This Means for Your Inbox
The email angle starts with DebugBear itself. A registrar takeover hands over the DNS zone, and that includes the MX records that decide where a company's email lands. DebugBear lost incoming email in the middle of its own incident response. Any company whose registrar login is protected by a weak password or SMS codes has the same single point of failure for both its scripts and its mail. We covered a similar vendor script chain in the Adform ad tech compromise.
For traders, the next wave is easy to predict. Polymarket says refunds need "No claims or tickets": it found eligible wallets from on chain and trading data. So an email offering a Polymarket "refund portal," asking you to connect your wallet or confirm your seed phrase, is a scam by definition. Bankless also reports that some larger victims were asked to sign a release with ID checks; verify any such request inside your Polymarket account, never through a link in an email. The Brevo breach that fed crypto phishing shows how fast crypto incidents turn into inbox lures.
How Can You Spot a Drainer Script?
You usually cannot see the script, but you can see what it asks for. Hudson Rock stresses that signing requests "are not silent signatures," so the warning sign is an approval you did not start. Its advice for exposed users, plus a few habits:
- Reject surprise signatures. A prompt that appears on a familiar site is not safe just because the site is familiar.
- Check from a clean session. Close possibly affected tabs and review orders, positions and transfers in a block explorer.
- Log out when you are done. This drainer needed an open, logged in tab. A closed tab gives it nothing.
- Keep a separate wallet for trading. Hold only what you are actively betting with on any web app.
- Ignore "recovery" contacts. Polymarket refunds are automatic; anyone offering help is not from Polymarket.
Browser extensions that touch wallets carry the same risk from the other direction, as the 19 Chrome and Edge wallet drainer extensions found by Socket showed.
What Should Security Teams Fix?
Treat any page that can sign a transaction as a page that should load almost nothing you do not host. The OWASP third party JavaScript guidance and Hudson Rock's recommendations line up:
- Remove analytics, RUM and tag scripts from authenticated trading and signing pages, or self host pinned copies.
- Add
integrityhashes to every external script that can be pinned, backed by a strict CSP. - Require fresh user confirmation for sells, transfers and relayer batches, so a script cannot chain them silently.
- Lock registrar accounts with hardware keys and registry lock. The vendor's registrar is part of your attack surface.
- Keep response bytes, hashes and request logs; Hudson Rock could analyze this payload only because someone captured it.
Why This Keeps Happening
Polymarket has now lost user funds to its front end twice in four months. Hudson Rock notes the June 25 incident, about $3 million, is unrelated to the October sample. And October 29 was the same day an attacker drained about $6.36 billion from Binance, a theft the FBI tied to North Korea, as we covered in the Binance TraderTraitor heist. The two attacks look nothing alike in size, but both went around the keys rather than through them: one through a laptop trusted to sign, one through a script trusted to run.
The $3.9 million refund is generous, and Polymarket says 95% of affected wallets have been refunded in full. The more useful number is the count of domains Polymarket trusted on a page that holds money. Every one of them, and every registrar behind them, is a way in. Polymarket says it is redeploying the vendor's script with "additional integrity controls and continuous monitoring and verification," per The Record. The safer fix is fewer scripts on that page.