The Script That Sat Beside the Wallet
A third-party script on a logged-in trading page could ask a wallet to sign.
A script the site did not author sat on the logged-in page. Traders’ wallets moved. The site’s own servers were not the signer.
On 29 October 2026, the same day as the exchange drain, public reporting described losses on Polymarket’s international platform. Accounts put the figure around $2.5 to $2.7 million taken from logged-in traders’ wallets. The company’s timeline, as relayed by the press, says a third-party provider was compromised, trading was moved to cancel-only, and the platform later resumed. The important design fact: the page users trusted loaded code the platform did not solely control, beside a session that could propose a signature.
The implementation is ordinary web architecture. Marketing tags, wallet connectors, embedded charts, and support widgets are scripts. A browser does not give them a smaller privilege than first-party code unless you build that boundary. Once a third-party script can call the wallet interface, compromising the vendor is enough. The platform’s database can be perfect and the money still moves, because the user — not the database — is the signer, and the user is signing what the page suggests.
We do not describe the script, the payload, or the transaction shape. We describe a page that is allowed to suggest a signature.
Any script on a page that can ask a wallet to sign is part of the transaction. A vendor tag is not analytics. It is a co-signer you do not employ.
HACKERS does not publish payloads, commands, vulnerable configurations, or any sequence that could be repeated. The walkthrough is a map of trust. A studio that becomes a manual is a defect. Authorise / Test / Improve.
On 29 October 2026, the same day as the exchange drain, public reporting described losses on Polymarket’s international platform. Accounts put the figure around $2.5 to $2.7 million taken from logged-in traders’ wallets. The company’s timeline, as relayed by the press, says a third-party provider was compromised, trading was moved to cancel-only, and the platform later resumed. The important design fact: the page users trusted loaded code the platform did not solely control, beside a session that could propose a signature.
The page was the policy.
Teams review smart contracts and forget the JavaScript that asks the wallet to call them. The hidden assumption is that a script from a known vendor is content, not code. In a browser, that distinction does not exist.
A second assumption: a wallet popup is consent. A popup that the user has been trained to click, showing an origin they recognise, is not an independent review. Simulation and allow-lists have to happen before the popup is the only speed bump.
A third assumption: taking the site to cancel-only is the control. It is a good emergency brake. The design control is that a third-party origin cannot request value movement on a quiet afternoon.
Name the false object, then drop it.
C1
Tags are content
Analytics and widgets are filed under marketing.
Every script is code with the page’s privileges unless isolated.
C2
The contract is the system
Review stops at the chain.
The suggestion layer is part of the system.
C3
The popup is review
A click is treated as understanding.
The wallet only sees what the page encoded.
C4
First party means safe origin
Users trust the domain in the address bar.
The address bar does not name every origin the page executed.
What actually sat on the table.
Teams review smart contracts and forget the JavaScript that asks the wallet to call them. The hidden assumption is that a script from a known vendor is content, not code. In a browser, that distinction does not exist.
Walkthrough: open the list of script origins on the logged-in trade page. Any origin you do not deploy yourself is a principal. Put those principals in a frame without access to the wallet object, or do not put them on that page. A content-security-policy that is report-only is a diary. Enforcement is the control.
Wallet design, on the user side: a transaction that does not match a human-readable simulation should be harder than a click. That is product design, not a lecture to users.
HACKERS does not publish payloads, commands, vulnerable configurations, or any sequence that could be repeated. The walkthrough is a map of trust. A studio that becomes a manual is a defect. Authorise / Test / Improve.
Do not study the outfit.
The domain was correct. The contract may have been correct. The page was not only your code.
Cancel-only mode was an honest brake. It also admitted the suggestion layer could not be trusted in the moment.
The implementation is ordinary web architecture. Marketing tags, wallet connectors, embedded charts, and support widgets are scripts. A browser does not give them a smaller privilege than first-party code unless you build that boundary. Once a third-party script can call the wallet interface, compromising the vendor is enough. The platform’s database can be perfect and the money still moves, because the user — not the database — is the signer, and the user is signing what the page suggests.
Login succeeded
Authority was never granted for this action
Vendor is reputable
The vendor identity can reach the crown jewel
Version number matches
The artefact was not the reviewed build
Dashboard is green
The picture shares a trust root with the failure
S1 Trusted domain
What the user saw 95 / Who could speak 40
S2 Extra scripts
What the user saw 80 / Who could speak 20
S3 Wallet prompt
What the user saw 50 / Who could speak 15
S4 Valid signature
What the user saw 20 / Who could speak 5
The chain cannot see the script.
A1
Inventory origins
Every script origin on a money page is listed and owned.
A2
Isolate
Third parties do not receive the wallet bridge.
A3
Enforce policy
Content security policy blocks, it does not only report.
A4
Simulate
A signature UI shows the effect in language, not only in calldata.
P1 Identity
Who may cause a release, a signature, or a spend.
A logged-in person, package, or vendor is treated as the grant.
P2 Provenance
Proof that an artefact is the one that was reviewed.
A name and a version number are treated as provenance.
P3 Blast radius
How far one secret, runtime, or script can reach.
One credential is valid in every tenant, wallet, or pipeline.
P4 Independent picture
A measurement that does not share the failing trust root.
The dashboard, the package page, and the operator screen are the same story.
| ID | Failure | What broke | Control |
|---|---|---|---|
| F1 | Tags are content | Analytics and widgets are filed under marketing. | Every script is code with the page’s privileges unless isolated. |
| F2 | The contract is the system | Review stops at the chain. | The suggestion layer is part of the system. |
| F3 | The popup is review | A click is treated as understanding. | The wallet only sees what the page encoded. |
| F4 | First party means safe origin | Users trust the domain in the address bar. | The address bar does not name every origin the page executed. |
A bank vault
The teller’s key also opens the vault
Custody is a ceremony, not a login
A hospital pharmacy
The supplier’s label is the prescription
The drug and the authority to administer it are different objects
Air-traffic control
A radio call is a clearance
Clearance is a separate grant, logged and bounded
Any script on a page that can ask a wallet to sign is part of the transaction. A vendor tag is not analytics. It is a co-signer you do not employ.
If the third-party origin cannot touch the wallet bridge, the vendor incident stays a vendor incident.
01 Money pages are strict
Logged-in trade and transfer pages load a short allow-list. Marketing tags live elsewhere.
02 No bridge for guests
Third-party frames do not receive the wallet object.
03 Enforced CSP
Unexpected script origins do not execute.
04 Readable simulation
The wallet or the app states the asset, the amount, and the destination before a click is meaningful.
- Tags load on the same page as the wallet.
- CSP is report-only, forever.
- Review scope is the contract.
- The emergency brake is cancel-only after the fact.
- Money pages have a script allow-list.
- Third parties cannot see the bridge.
- Policy blocks.
- The user sees the effect, not only a hex string.
Logged-in traders
Reported losses were in the low millions of dollars. The class is every similar page.
The protocol
A valid signature looks like the user. Support cannot always unwind it.
Other apps
Any site that mixes analytics with a signer has the same join.
| Topic | Typical brief | HACKERS studio |
|---|---|---|
| What most courses teach | A vulnerability name and a patch link. | The trust that made the patch late, and the redesign that makes the class fail closed. |
| What a board hears | We were targeted by a sophisticated actor. | Which ordinary permission did the actor inherit, and who can revoke it in one action? |
| What an engineer is asked | Rotate the keys. | Which keys, in which blast radius, with which proof they cannot be re-read from the same store? |
Elite programmes still stop at the object.
A university lab that copies this file into a how-to has failed the ethics charter.
The transferable object is the control design: identity, provenance, blast radius, and an independent picture.
HACKERS does not publish payloads, commands, vulnerable configurations, or any sequence that could be repeated. The walkthrough is a map of trust. A studio that becomes a manual is a defect. Authorise / Test / Improve.
Do not admire the turning point. Redesign the join.
Draw the crown-jewel outcome this incident could reach in two hops.
Draw the crown-jewel outcome this incident could reach in two hops.
Name the permission that was inherited, not stolen in the cinematic sense.
Write the one control that makes the chain fail closed without a hero on call.
List script origins on the logged-in transfer page.
If you cannot show the artefact, the grant, and the revoke path, the control is a slogan.
Hour 0–4
Name the jewel
Write the outcome that must not move: funds, secrets, identity, or a physical process.
Hour 4–24
Draw two hops
List every identity, package, script, and vendor that can influence that outcome.
Hour 24–48
Install a fail-closed
Put a bound, a second channel, and a named revoke on the widest hop. Do not add a tool that only alerts.
- Calling the incident sophisticated when the permission was ordinary.
- Rotating secrets inside the same store that was read.
- Patching a runtime and leaving the secrets that runtime could already see.
- A third-party script, package, or vendor with the same authority as first-party code.
Any script that can request a signature is production code, whoever hosts it.
Write every script host on the money page. Marketing scripts do not load there. Widgets do not receive the wallet bridge. Block unexpected scripts. Simulation in plain language before the user can confirm.
- Are third-party scripts always wrong?
- They are wrong on pages that can move value, unless they are isolated from the signer.
- Did the chain fail?
- Public reporting points at a compromised third-party provider on the web page. A valid signature is the chain working as specified.
Cited for classification and method. Not as a manual. Atlas cases are educational and defensive.