Upgrade prefab-ui to 0.21.0 or turn off GenerativeUI on your FastMCP server

Prefab UI's 'sandbox' for AI-written UI code let it read and write files on the server (CVSS 10) · Security incident · Web · jfrog · Nov 1, 2026

What happened

JFrog Security Research disclosed CVE-2026-120338 on 1 Nov. Prefab UI's Generative UI sandbox, documented as isolation for untrusted and model-written code, started Deno with unrestricted read, write and network permissions and left the Deno API reachable from the Python code. Anyone who could call FastMCP's generate_prefab_ui tool could read and write files as the server user, and JFrog showed code planted in a .pth file running on the next Python start. Affects 0.14.0 to before 0.21.0; JFrog scores it 10.0 on a server with no authentication. Generative UI is opt-in and needs Deno on the host.

How to prevent it

A 'sandbox' for AI-generated code is only as strong as the permissions of the process around it. Never expose code-running MCP tools without authentication.

Fix prompt for your own AI tool

Copy this into your own AI tool (Cursor, Lovable, Claude Code, Bolt…). It's general guidance written by us. Review what the AI suggests before applying it.

I run a FastMCP server (or an app that uses prefab-ui) with my AI tools. Help me check for CVE-2026-120338: 1) Find which prefab-ui version I have (it comes in with fastmcp[apps]) and whether I register the GenerativeUI provider or the generate_prefab_ui tool. 2) Give me the command to upgrade prefab-ui to 0.21.0 or later. 3) If I can't upgrade today, show me how to remove GenerativeUI and require authentication on the server. 4) Help me look for unexpected .pth files in my virtualenv's site-packages folder. Don't change anything until I approve the plan.

Why this keeps happening: trusting agents & ai input

An AI agent treats everything it reads as possible instructions: a web page, a README, an email, a code comment or the output of another tool. If that content was written by an attacker, the agent can be steered into running commands, reading files or sending data somewhere it should not.

A quick checklist before you ship

More on this: every trusting agents & ai input story and our related guide.

Tools involved

MCP stories, FastMCP stories

Related stories

Source: original post on Web ↗. Summarised in our own words; numbers are as stated by the source. Browse all stories.

The Honest Build. Real stories, not hype.

Every week: real stories of what building with AI actually took, the one lesson worth keeping, and the security slip-ups to avoid. Free, unsubscribe anytime. Weekly, every Friday.