Skip to content

Hack Atlas · ATLAS / DEF-26 · AI & Agent Safety

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.

File
ATLAS / DEF-26
Domain
Page trust
Framework
Third-party script is code
Studio
26 min studio
Stance
Educational / defensive

Fig. 00 — Third-party script is code — signature diagram

SAME OBJECTFACTORY → POCKET → TILL

00 / Abstract

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.

01 / Classification

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.

02 / Hidden frame

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.

03 / Four false objects

Name the false object, then drop it.

  1. C1

    Tags are content

    Analytics and widgets are filed under marketing.

    Every script is code with the page’s privileges unless isolated.

  2. C2

    The contract is the system

    Review stops at the chain.

    The suggestion layer is part of the system.

  3. C3

    The popup is review

    A click is treated as understanding.

    The wallet only sees what the page encoded.

  4. 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.

04 / The system

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.

05 / What it looked like while it was happening

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.

06 / The chain

PageA logged-in trading page loadsTagA third-party script is included for a side purposeSame privilegeThe script can see the session and the wallet bridgeVendorThe third party is compromisedSuggestionThe page proposes a signature the user did not intendIf the third-party origin cannot touch the wallet bridge, the vendor incident stays a vendor incident.
How a widget became able to ask for money

Apparent health against the actual grant

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

Tag, bridge, signature

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.

Page calculus

  1. A1

    Inventory origins

    Every script origin on a money page is listed and owned.

  2. A2

    Isolate

    Third parties do not receive the wallet bridge.

  3. A3

    Enforce policy

    Content security policy blocks, it does not only report.

  4. A4

    Simulate

    A signature UI shows the effect in language, not only in calldata.

Code that can request a signature is production code, whoever hosts it.

Where the design has to change

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.

10 / Failure taxonomy

Failure taxonomy and corresponding defences
IDFailureWhat brokeControl
F1Tags are contentAnalytics and widgets are filed under marketing.Every script is code with the page’s privileges unless isolated.
F2The contract is the systemReview stops at the chain.The suggestion layer is part of the system.
F3The popup is reviewA click is treated as understanding.The wallet only sees what the page encoded.
F4First party means safe originUsers trust the domain in the address bar.The address bar does not name every origin the page executed.
Fig. — Failures and the controls that match them

The same join in other systems

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.

Defence as architecture

  1. 01 Money pages are strict

    Logged-in trade and transfer pages load a short allow-list. Marketing tags live elsewhere.

  2. 02 No bridge for guests

    Third-party frames do not receive the wallet object.

  3. 03 Enforced CSP

    Unexpected script origins do not execute.

  4. 04 Readable simulation

    The wallet or the app states the asset, the amount, and the destination before a click is meaningful.

The system as built

  • 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.

The system that would have contained it

  • 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.

Second-order system

  1. Logged-in traders

    Reported losses were in the low millions of dollars. The class is every similar page.

  2. The protocol

    A valid signature looks like the user. Support cannot always unwind it.

  3. Other apps

    Any site that mixes analytics with a signer has the same join.

Typical brief versus HACKERS studio
TopicTypical briefHACKERS studio
What most courses teachA 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 hearsWe 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 askedRotate the keys.Which keys, in which blast radius, with which proof they cannot be re-read from the same store?
Fig. — The join lives between chairs

15 / What the brief missed

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.

16 / Design studio

Do not admire the turning point. Redesign the join.

Draw the crown-jewel outcome this incident could reach in two hops.

  1. Exercise 01

    Draw the crown-jewel outcome this incident could reach in two hops.

  2. Exercise 02

    Name the permission that was inherited, not stolen in the cinematic sense.

  3. Exercise 03

    Write the one control that makes the chain fail closed without a hero on call.

Interrogate the join

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.

48-hour authorised studio

  1. Hour 0–4

    Name the jewel

    Write the outcome that must not move: funds, secrets, identity, or a physical process.

  2. Hour 4–24

    Draw two hops

    List every identity, package, script, and vendor that can influence that outcome.

  3. 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.

Anti-patterns

  • 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.

19 / The transferable lesson

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.

Questions we are asked

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.

Public sources

Cited for classification and method. Not as a manual. Atlas cases are educational and defensive.