Polymarket Script Drain: How a Vendor Compromise Cost $3.9 Million

An analysis of the October 2026 Polymarket front-end hijack, explaining how a compromised third-party script drained wallets during active sessions.

6 min read

A front-end hijack targeted the polymarket.com platform on October 29, 2026, as reported by Gblock. The incident centered on a third-party performance monitoring tool provided by a vendor named DebugBear. An attacker replaced this benign script with a malicious wallet drainer. This unauthorized code functioned by generating transfers and sell orders while users were actively connected in their browser sessions. The script drain impacted 726 trader wallets, resulting in $2.7 million stolen, with a median impact of $171 per wallet. Gblock noted that Polymarket announced plans to refund $3.9 million to impacted users, covering the theft and trading pause losses. The publication also noted a statement from the vendor, DebugBear, explaining that the breach happened via its domain registrar.

This incident illustrates a growing vector for silent losses in decentralized finance. Users often focus entirely on the security of the underlying smart contracts, assuming that if the blockchain code is secure, their funds are safe. However, the web interfaces used to interact with these contracts rely on traditional internet infrastructure, which carries its own distinct set of vulnerabilities.

The Mechanics of a Front-End Hijack

When depositors interact with a decentralized application, they do so through a web browser that loads various elements to display the page and monitor its performance. Modern websites rarely host all their code on a single server. Instead, they pull in external resources, such as the performance monitoring script provided by DebugBear. These third-party scripts typically run with the same level of access to the browser environment as the primary code of the website itself.

In a front-end hijack, the attacker does not need to breach the blockchain or alter the smart contracts holding the funds. The decentralized protocols remain entirely intact. Instead, the attacker targets the web interface that constructs the transactions the user will eventually sign. By swapping a legitimate script for a wallet drainer, the attacker turns the trusted website into a hostile environment.

When a user connects their wallet to a decentralized application, they are essentially granting the web interface permission to propose transactions. The interface itself cannot move funds, but it acts as the bridge between the user's intent and the blockchain. If an attacker compromises this bridge, they control what the user sees and what the wallet is asked to sign. The underlying smart contracts remain secure, but the instructions sent to them are manipulated before the user even realizes a change has occurred.

According to the incident details, the malicious script operated during active user browser sessions. This means the drainer waited for a user to navigate to the site, connect their wallet, and begin interacting with the platform. Because the user trusted the domain they were visiting, they were likely prepared to approve routine actions. The drainer exploited this trust by generating unauthorized transfers and sell orders, pushing them to the connected wallet for approval while the user was actively engaged with the interface.

The Role of the Domain Registrar

The compromise of the vendor script did not necessarily require the attacker to breach the internal servers of the vendor itself. According to the statement from DebugBear reported by Gblock, the break-in occurred through its domain registrar. A domain registrar is the service that manages the reservation of internet domain names and directs traffic to the correct hosting servers.

When a domain registrar account is compromised, an attacker gains the ability to change the domain name system records. These records act as the directory of the internet. By altering them, the attacker can redirect any request for the legitimate performance monitoring script to a server controlled by the attacker. The decentralized application, functioning exactly as programmed, requests the script from the expected web address. Because the registrar records have been manipulated, the application receives the wallet drainer instead.

This type of supply chain attack highlights a critical dependency in decentralized finance. A platform can secure its own servers and audit its own smart contracts, but it remains vulnerable to the security practices of every external vendor it integrates. If a vendor loses control of its domain registrar, any site loading scripts from that vendor inadvertently delivers malicious code to its users. The seamless nature of this redirection means neither the platform developers nor the users receive an immediate technical warning that the loaded script has changed.

Silent Losses Through Active Sessions

The Polymarket incident demonstrates how attackers can drain funds without extracting private keys or seed phrases. The wallet drainer functioned by submitting transfers and sell orders during active sessions. In decentralized finance, a user retains custody of their assets through their wallet software, which acts as a gatekeeper. The web browser cannot move funds on its own; it must request permission from the wallet.

However, when a user connects their wallet to a decentralized application, they establish an active session. During this time, the malicious script can rapidly generate transaction requests. Because the user is already interacting with the site, they might mistake a malicious signature request for a legitimate platform requirement. The drainer constructs the transaction—such as a transfer of assets to the attacker's address or a sell order designed to liquidate positions—and presents it to the user's wallet.

If the user approves the prompt without carefully scrutinizing the transaction details, the wallet signs the request and broadcasts it to the blockchain. The loss occurs silently from the perspective of the smart contract, which simply processes a valid, cryptographically signed instruction from the asset owner. The median loss of $171 across 726 wallets suggests that the drainer systematically targeted available balances or positions as soon as the active session permitted, accumulating the $2.7 million theft total through numerous individual approvals rather than a single massive vault breach.

What Depositors Could Have Checked

While depositors cannot audit the domain registrar security of third-party vendors, they possess the final authority over their funds at the wallet level. The most critical defense against a front-end hijack is the careful inspection of every signature and approval request presented by the wallet software. A script drainer relies on the user blindly approving prompts during an active session.

Depositors can protect themselves by reading the specific details of what they are signing. If a user navigates to a platform to check a balance but receives a prompt to approve a transfer or a sell order, this unexpected request is a severe risk signal. Legitimate decentralized applications do not require users to sign asset transfers simply to view a page or maintain a login state. Any uninitiated prompt should be rejected immediately, and the wallet should be disconnected from the site.

Furthermore, depositors can limit their exposure by strictly managing their active sessions. Leaving a wallet connected to a web interface while stepping away or browsing other tabs leaves the session open to potential exploitation if a script is hijacked in the background. Disconnecting the wallet when active trading or interaction is complete reduces the window of opportunity for a drainer. Finally, utilizing separate wallets for different activities—keeping long-term holdings entirely disconnected from web interfaces and only funding an active trading wallet with the necessary amounts—ensures that a compromised front-end can only ever access a limited portion of a user's total assets.

Security in decentralized finance requires a shift in how users view web interfaces. A website is not a static, unchangeable document; it is a dynamic application that constantly loads new code from various sources. Treating every approval prompt with skepticism, even on a familiar and trusted platform, is a necessary habit. By understanding that the browser session itself is a potential attack vector, depositors can better protect their assets from silent extraction.

Yield Sniper publishes a daily risk-scored report on DeFi yield: every pool in it is checked for audits, hack history, simulated withdrawal (exit) health and holder concentration, and the report arrives by email and Telegram.

Sources

Every figure, date and name in this article comes from these pages. Each one was checked against the page before publishing.

  1. 1.Gblockgblock.app · 4 Nov 2026

Educational content, not financial advice. Figures are as reported by the sources on the dates shown and may change as investigations continue.

All articles