November 30, 2026
How I Found a Critical Stored XSS on Royco, Proved On-Chain Fund Theft, and Got $0 After 4 Monthsβ¦
By w0lf3ense β November 2026
By Wlfense
6 min read
TL;DR
I found a Stored Cross-Site Scripting vulnerability on Royco's production frontend (app.royco.org) that allowed unauthenticated attackers to permanently inject JavaScript into any market page. The script ran in the application's trusted origin, accessed connected wallets via window.ethereum, and initiated real on-chain fund transfers β all without the victim clicking anything on the page.
I reported it through Immunefi. Royco closed it as "out of scope" on a domain technicality. I requested mediation. I provided every piece of evidence Immunefi asked for β same day, every time. I waited 121 days. I paid $100 in submission fees.
The mediation team's final verdict: "social engineering."
Here's the full story.
The Vulnerability
Date discovered: July 2026
Asset: app.royco.org β Royco's production web application
Severity: Critical
Impact: Direct theft of user funds
Royco is a DeFi protocol. Their frontend lets users browse and interact with on-chain markets. Each market has a description field that is rendered using react-markdown with the rehype-raw plugin β and no sanitizer.
The write endpoint that populates this field:
POST https://app.royco.org/api/v1/market/createPOST https://app.royco.org/api/v1/market/createhas three problems:
- No authentication. Anyone can call it. No API key, no session, no signature.
- No ownership check. The server derives the market ID from a public
txHash. You don't need to be the market creator to write its description. - First-writer-wins. The insert uses the market ID as a primary key. Once written, the legitimate owner cannot overwrite or delete it.
The description is stored raw and rendered via rehype-raw with no rehype-sanitize or DOMPurify. The CSP on app.royco.org has no script-src directive.
An <iframe srcdoc="<script>...</script>"> in the description executes arbitrary JavaScript in the https://app.royco.org origin for every visitor of that market page.
The Proof of Concept
I injected three test markets on Sepolia (testnet) using their public txHash values β markets I did not create:
curl -s -X POST "https://app.royco.org/api/v1/market/create" \
-H "Content-Type: application/json" \
--data '{
"chainId": 11155111,
"marketType": 0,
"name": "Stored XSS By w0lf3ense",
"txHash": "<PUBLIC_CREATION_TX>",
"description": "<iframe srcdoc=\"<script>alert(document.domain)</script>\"></iframe>"
}'curl -s -X POST "https://app.royco.org/api/v1/market/create" \
-H "Content-Type: application/json" \
--data '{
"chainId": 11155111,
"marketType": 0,
"name": "Stored XSS By w0lf3ense",
"txHash": "<PUBLIC_CREATION_TX>",
"description": "<iframe srcdoc=\"<script>alert(document.domain)</script>\"></iframe>"
}'Response: HTTP 201 β "Market created successfully" β the payload stored verbatim, on a market I never created.
Opening the market page: alert("app.royco.org") fires. document.domain === "app.royco.org". The script runs in Royco's trusted origin.
Escalation: Connected Wallet β Fund Theft
Immunefi's mediation team asked me to prove the wallet-theft impact with an already-connected wallet. I did.
I recorded a continuous video showing:
- MetaMask connected to
app.royco.orgon Sepolia - Victim opens the injected market page
- The stored script executes automatically β no click on the page
- The script calls
eth_sendTransactionviawindow.ethereum - MetaMask shows a confirmation prompt: "Request from app.royco.org"
- On approval, funds transfer on-chain from the victim wallet to the attacker address
- Transaction hash verified on Sepolia Etherscan
No password entered. No wallet re-connected. No button clicked on the page. The script did everything.
The Timeline
Date What happened Jul 21 Report submitted to Immunefi. Escalated to Royco within 19 minutes. Aug 1 Royco closes it: "app.royco.org is not a listed asset." Mediation requested. Aug 3 Immunefi asks for wallet-theft proof with a connected wallet. Aug 4 I deliver the full video PoC within 24 hours. Immunefi can't accept my upload format. Aug 5 I upload to YouTube per their guidelines. Video delivered. Aug 13 Last message from Immunefi. Then: silence. Sep 25 I break 43 days of silence with follow-ups. Immunefi responds: "We are speaking with Royco." Sep 29 Immunefi asks 3 clarifying questions. I answer all 3 within 2 hours. Sep 30 Immunefi writes to Royco. Then: silence again. Oct 24 24 more days of silence. I write a detailed message documenting the full timeline. Nov 9 111 days since submission. I write again. No response. Nov 18 "Tell me exactly what I need to do β answer me!" Nov 22 Immunefi asks me to re-share evidence as "All Participants" so Royco can see it. I do it immediately. Nov 24 Royco responds: "Our position is final. Close it." Nov 29 Immunefi closes the mediation. Verdict: "social engineering."
Total time: 131 days. Bounty: $0. Submission fee paid: $100.
The "Social Engineering" Argument β and Why It's Wrong
Immunefi's final reasoning:
"The attack needs the visitor to (1) open a link, (2) see an 'unverified' warning, and (3) approve a MetaMask prompt. Persuading them to do this is a social engineering attack."
Let me address each point.
"The victim has to open a link"
Every Stored XSS in history requires a victim to visit a page. That's what "stored" means β the payload persists and waits for someone to load it. If visiting a page makes an XSS into "social engineering," then no Stored XSS on any bug bounty program has ever been valid. That is an absurd standard that would invalidate the entire vulnerability class.
"The market shows an 'unverified' warning"
The "unverified" label exists because I tested responsibly on Sepolia testnet markets. The underlying vulnerability β the unauthenticated, ownerless POST /api/v1/market/create endpoint β applies to all markets, including verified ones on mainnet.
The write is first-writer-wins with no auth. An attacker can front-run any market creator's description write and permanently plant a payload on a verified, listed market. The "unverified" label is a consequence of my responsible testing choices, not a limitation of the exploit.
"The victim has to approve in MetaMask"
MetaMask shows: "Request from app.royco.org."
The victim is already connected to app.royco.org. They trust this origin. They see a transaction request from a domain they deliberately connected their wallet to. The attacker's script runs invisibly inside that trusted origin β there is no indication that the request comes from injected code rather than from Royco's own application.
If MetaMask confirmation were a mitigating factor, then no XSS on any DeFi platform would ever be Critical, because every on-chain action requires wallet approval. That interpretation makes the entire Web3 bug bounty category meaningless.
What Was Never Disputed
Throughout 131 days, across all messages from Royco and Immunefi, the following was never challenged:
- β
The Stored XSS is real and executes in the
app.royco.orgorigin - β The write endpoint requires no authentication and no ownership
- β
The injected script initiates
eth_sendTransactionfrom the trusted origin - β Funds transferred on-chain (verified on Etherscan)
- β Royco's own closing message: "This is not a comment on the technical quality of the work"
- β
royco.orgis listed under Primacy of Impact since January 2025 - β Immunefi confirmed on August 3rd that Primacy of Impact "is meant to prevent an in-scope Critical impact from being lost on an asset-naming point"
The Real Problem
The "social engineering" classification was first raised on November 29th β 121 days into the mediation. If this was genuinely the basis for closure, it should have been identified on August 3rd when the mediation team first reviewed the report.
Instead, I spent four months answering questions, providing evidence, waiting through weeks of silence, and being told the team was "looking into it." The classification appeared only after Royco said "our position is final" β giving the impression that the mediation team worked backwards from the desired outcome to find a justification.
The Numbers
Metric Value Days from submission to closure 131 Days of mediation 121 Submission fee paid $100 Follow-up messages sent 20+ Longest silence from Immunefi 43 days Questions answered within 2 hours 3/3 Evidence requests delivered same-day 100% Bounty received $0
Lessons Learned
- Always PoC on the exact in-scope asset. My PoC was on Sepolia testnet markets. If I had demonstrated it on a verified mainnet market, the "unverified warning" argument would not have existed. Responsible testing cost me the bounty.
- Immunefi's free mediation is not mediation. It is a relay service with no SLA, no accountability, and no obligation to issue a timely decision. If you need real mediation, pay for Priority β or don't use the platform at all.
- "Social engineering" is the new "informational." When a platform wants to deny a payout, any user interaction β even visiting a URL β can be reframed as social engineering. This is a catch-all that can invalidate any client-side vulnerability.
- The researcher bears all the risk. I paid $100, spent months of professional time, found a real vulnerability, proved fund theft on video, and received nothing. The project got a free security audit and The platform collected the submission fee.
To Immunefi
121 days. 43 days of silence. A "social engineering" classification that appeared 4 months after the report. You asked me to prove wallet theft β I proved it. You asked three clarifying questions β I answered in two hours. You told me Primacy of Impact exists for exactly this situation β then you ignored it.
Your mediation process failed a researcher who did everything right.
To Other Researchers
Document everything. Screenshot every response. Record every PoC. And understand that doing everything right still might not be enough.
w0lf3ense is an independent security researcher specializing in Web2 vulnerabilities on Web3 targets.
All testing was performed on researcher-controlled accounts using testnet assets. No third-party funds or accounts were affected.