We pwned X, Vercel, Cursor, and Discord through a supply-chain attack
TL;DR Highlight
One SVG upload on Mintlify ran scripts on Discord, X and Vercel domains
Who Should Read
Backend or frontend developers who proxy third-party services like docs or blogs under their main domain paths
Core Mechanics
- Mintlify endpoint never checked the host
- /_mintlify/static/[subdomain]/[...route] accepted any Mintlify docs subdomain and returned its static files.
- It did not verify that the subdomain matched the requesting host.
- The similar markdown endpoint returned only raw markdown text, so no code could run.
- SVG with a script gave XSS
- The static endpoint had a file-extension whitelist that blocked HTML and JS but allowed SVG.
- The author uploaded a script-carrying SVG to his own Mintlify docs and opened it via discord.com/_mintlify/... and it executed.
- Endpoint was found in the Mintlify CLI package
- Searching web assets did not turn it up.
- A tarball inside the npm package @mintlify/cli held the Next.js-compiled endpoint list.
- One link could take over accounts
- Customers hosting docs on their primary domains were affected.
- Named customers include X (Twitter), Vercel, Cursor and Discord.
- The author says nearly every Mintlify customer was in scope.
- Discord shut docs for 2 hours and rolled back
- Discord closed its developer docs for 2 hours while assessing impact.
- It then returned to its old docs platform and removed all Mintlify routes.
- Total bounties were about $11,000
- Discord paid $4,000.
- Mintlify paid separately for the bugs each person found.
Community Reactions
- Opinion that this is not really a supply-chain attack
- One commenter said the term usually means malicious package scripts or hardware backdoors, not XSS.
- One third-party compromise hitting many customers fits the same pattern.
- Opinion: don't put third parties on your core domain
- Several commenters said proxying a third party onto a domain with user credentials is a bad idea.
- They suggested a separate subdomain like dev-docs.discord.com or a different domain entirely.
- Experience and advice on CSP and SVG sanitizing
- Commenters said Content-Security-Policy could block script execution in SVGs.
- One who runs an upload pipeline said they sanitize every SVG with DOMPurify and rasterize to PNG when possible.
- Report of downstream phishing on the same surface
- One commenter said 38 days after disclosure they collected 121 IOCs from OpenPhish and OTX.
- They said 101 were discord.flawing.top/blog/* URLs and 20 were phishing URLs hosted on Vercel.
- Info about a bigger RCE on Mintlify
- A commenter pointed out a collaborator's writeup includes an RCE on a Mintlify server.
- Many commenters felt the bounties were far too low for the impact.
How to Apply
- List third parties proxied under your domain
- Today, scan your reverse proxy and CDN config for rules that forward main-domain subpaths to external services.
- Mark docs, blog and help-center proxies as candidates to move to a separate subdomain.
- Add CSP headers to static and upload responses
- Set Content-Security-Policy: script-src 'none' on responses for user-uploaded files such as SVG.
- Open one directly in a browser to confirm no script runs.
- Sanitize uploaded SVGs before storing
- Strip scripts in the upload pipeline with a tool like DOMPurify.
- Convert to PNG where possible.
- Check host validation on multi-tenant routes
- In code, check whether endpoints taking a [tenant] path value compare it to the request host.
- Add a test that returns 404 on mismatch.
Try It
# Paste into Claude or ChatGPT (audit prompt inspired by the Mintlify incident)
Below are our reverse proxy/CDN config and static file serving code.
{{config and code}}
Audit them and answer in a table.
1. Third-party services proxied under our main domain and their risk level
2. Endpoints that take a tenant/subdomain in the path without checking it against the request host
3. Whether user-uploaded files like SVG responses carry Content-Security-Policy (script-src 'none')
4. A concrete fix for each issue (config or code example)Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques
Related Resources
- https://gist.github.com/hackermondev/5e2cdc32849405fff6b46957747a2d28
- https://kibty.town/blog/mintlify/
- https://discordstatus.com/incidents/by04x5gnnng3
- https://sgued.fr/blog/react-rce/#node-js-mitigations
- https://www.dugganusa.com/post/mintlify-xss-downstream-exploitation-captured
- https://en.wikipedia.org/wiki/Content_Security_Policy