← All advisories

CVE-2026-114126highCode execution2026-10-22

CVE-2026-114126: Storybook's dev server handed its WebSocket token to anyone on the LAN, letting them inject code into story files; @storybook/addon-mcp 10.6.0–10.6.1 affected (fixed 10.6.2)

The Storybook dev server, which the official Storybook MCP addon uses so AI coding agents can write and test UI stories, exposed its WebSocket auth token in pages any device could load by IP. Anyone on the same network (or a fake Wi-Fi access point) could take the token and use the WebSocket to inject code into story files or create new files, and under the right conditions, especially with the Vitest addon and an old Vitest, run code on the developer's machine. Storybook patched 8.6.19, 9.1.21, 10.6.2 and 11.0.0-alpha.6 and now binds to 127.0.0.1 by default.

01.

What it is

The dev server listened on all interfaces and served the WebSocket token in its HTML, so the token was effectively public on the LAN. The WebSocket could edit or create story files.

Affected packages include storybook (8.0.0–8.6.18, 9.0.0–9.1.20, 10.0.0–10.6.1, 11.0.0-alpha.0–alpha.5), @storybook/core and core-server 8.x, @storybook/addon-vitest, and @storybook/addon-mcp 10.6.0–10.6.1 and 11.0.0-alpha.0–alpha.5.

Not affected: dev servers other devices can't reach (e.g. a container port published only on 127.0.0.1), trusted networks, or a built static Storybook.

Behaviour changes in the fix: the dev server binds to 127.0.0.1 by default (use --host plus core.allowedHosts to share), the Vitest addon disables browser.api.allowWrite/allowExec, and saveStoryRequest validates input more strictly. GitHub advisory published 22 October 2026.

02.

How to check

  1. Run npm ls storybook @storybook/addon-mcp @storybook/addon-vitest in each project.
  2. If you've run storybook dev on shared or public Wi-Fi with an affected version, review recent changes to *.stories.* files and new files in your repo.
03.

How to fix

  1. Upgrade Storybook and its addons to 10.6.2 (or 9.1.21 / 8.6.19 / 11.0.0-alpha.6) before running storybook dev again, e.g. npx storybook@latest upgrade.
  2. Keep the dev server on 127.0.0.1; to share, publish a static build instead of exposing the dev server.
npm ls storybook @storybook/addon-mcp @storybook/addon-vitest
npx storybook@latest upgrade
04.

Sources

More advisories for this tool
The weekly email

One email a week. Only what changed.

Every new security hole in AI coding tools, MCP servers, app builders and the stacks they generate (Next.js, Supabase, Node, PHP), each with how to check your app and the fix. No roundups of things you already read.

Free, one email a week. Read the latest issue first if you like. One-click unsubscribe in every email. We never sell or share addresses.