CVE-2026-114126: Storybook dev server vulnerable to code injection from the local network
The Storybook dev server hands its WebSocket authentication token to any client that can load its HTML pages. A host on the same LAN can use that token to write story files and, with the Vitest addon, run code on the developer's machine. Fixed in storybook 8.6.19, 9.1.21, 10.6.2 and 11.0.0-alpha.6. Teams that run storybook dev on shared or public networks should upgrade now.
Published Oct 22, 2026 · Analysis Oct 22, 2026
What an attacker can do
Before the fix, storybook dev bound to all network interfaces. Any device on the same network could open the server by IP address and read the WebSocket token from the served page. With that token an attacker could send a saveStoryRequest message. Weak input validation let the attacker write a payload into a story file or create new files.
The attacker could then trigger a test run over the same socket. If the Vitest addon is installed, the payload can call a Vitest browser API to write other files on the developer's disk. Whether that becomes code execution depends on where the file lands and what software the developer runs. The advisory says the risk is higher with an old Vitest version.
The attacker needs network adjacency: the same LAN, or a WiFi access point posing as a trusted one. No credentials and no user interaction are needed. You are not exposed if the port is unreachable from other devices, if you only use a trusted network, or if you serve a built Storybook.
Who is affected
Affected storybook ranges: 8.0.0 up to 8.6.19, 9.0.0 up to 9.1.21, 10.0.0 up to 10.6.2, and 11.0.0-alpha.0 up to 11.0.0-alpha.6. The same ranges apply to @storybook/core, @storybook/core-server, @storybook/experimental-addon-test (8.x), @storybook/addon-vitest (9.x and later) and @storybook/addon-mcp (10.6.0 and later).
Check your installed versions:
npm ls storybook @storybook/addon-vitest @storybook/addon-mcpCheck whether your dev script uses --host 0.0.0.0 or a Docker setup that publishes port 6006 beyond 127.0.0.1.
storybook
- Ecosystem
- npm
- Affected
- >= 8.0.0, < 8.6.19
- Fixed in
- 8.6.19
- Check
npm ls storybook
storybook
- Ecosystem
- npm
- Affected
- >= 9.0.0, < 9.1.21
- Fixed in
- 9.1.21
- Check
npm ls storybook
storybook
- Ecosystem
- npm
- Affected
- >= 10.0.0, < 10.6.2
- Fixed in
- 10.6.2
- Check
npm ls storybook
storybook
- Ecosystem
- npm
- Affected
- >= 11.0.0-alpha.0, < 11.0.0-alpha.6
- Fixed in
- 11.0.0-alpha.6
- Check
npm ls storybook
@storybook/core
- Ecosystem
- npm
- Affected
- >= 8.0.0, < 8.6.19
- Fixed in
- 8.6.19
- Check
npm ls @storybook/core
@storybook/core-server
- Ecosystem
- npm
- Affected
- >= 8.0.0, < 8.6.19
- Fixed in
- 8.6.19
- Check
npm ls @storybook/core-server
@storybook/experimental-addon-test
- Ecosystem
- npm
- Affected
- >= 8.0.0, < 8.6.19
- Fixed in
- 8.6.19
- Check
npm ls @storybook/experimental-addon-test
@storybook/addon-vitest
- Ecosystem
- npm
- Affected
- >= 9.0.0, < 9.1.21
- Fixed in
- 9.1.21
- Check
npm ls @storybook/addon-vitest
@storybook/addon-vitest
- Ecosystem
- npm
- Affected
- >= 10.0.0, < 10.6.2
- Fixed in
- 10.6.2
- Check
npm ls @storybook/addon-vitest
@storybook/addon-vitest
- Ecosystem
- npm
- Affected
- >= 11.0.0-alpha.0, < 11.0.0-alpha.6
- Fixed in
- 11.0.0-alpha.6
- Check
npm ls @storybook/addon-vitest
@storybook/addon-mcp
- Ecosystem
- npm
- Affected
- >= 10.6.0, < 10.6.2
- Fixed in
- 10.6.2
- Check
npm ls @storybook/addon-mcp
@storybook/addon-mcp
- Ecosystem
- npm
- Affected
- >= 11.0.0-alpha.0, < 11.0.0-alpha.6
- Fixed in
- 11.0.0-alpha.6
- Check
npm ls @storybook/addon-mcp
How to fix it
Upgrade to a patched release before you run storybook dev again: 8.6.19, 9.1.21, 10.6.2 or 11.0.0-alpha.6, matching your major version. Upgrade the addon packages to the same version.
The patched versions change defaults. The dev server now listens only on 127.0.0.1. To share it on a LAN, use storybook dev --host with the specific LAN address; host and origin validation stays on. If you use --host 0.0.0.0, set core.allowedHosts, or validation is disabled. The Vitest addon now disables browser.api.allowWrite and browser.api.allowExec, and saveStoryRequest accepts only serialized args and story titles.
If you cannot upgrade, do not run an affected dev server. The advisory also recommends Vite 6.4.2, 7.3.2 or 8.0.5, and Vitest 3.2.7 or 4.1.10. To share a build, run storybook build and serve the static output.
How to tell if you were hit
The advisory gives no indicators of compromise. Look for story files or new files you did not write, especially files containing play functions or code that touches the filesystem or spawns processes. Check version control for unexpected changes and files in directories outside the story folders. Review whether the dev server ran with --host on an untrusted network, and check firewall or router logs for unknown hosts connecting to port 6006 around that time.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary: The Storybook dev server exposes its WebSocket authentication token to any client that can load its HTML pages. Any host on a LAN can open a Storybook app by IP address, and therefore obtain the token. The WebSocket can be used to inject code into story files or to create new files. Under the right circumstances, an attacker can execute code on the machine of a developer connected on the same LAN.
Who is impacted?
You are impacted if you run a Storybook dev server whilst connected on an untrusted local network, or to a WiFi access point posing as a trusted network. The impact of this advisory is more important if you have the Vitest addon installed and are using an old version of Vitest.
You are not impacted if:
- You run a dev server in an environment that other devices on your network cannot reach (e.g. a container that does not publish the Storybook port, or publishes it only on
127.0.0.1) - You run a dev server whilst connected to a trusted local network
- You serve a built version of Storybook on your machine
Recommended actions
Upgrade Storybook
Storybook has released patched versions of all affected major Storybook versions that fix all the vulnerabilities necessary for the worst-case scenario above to occur.
Upgrade to a patched version listed below before running storybook dev again. If you cannot upgrade immediately, do not run an affected Storybook dev server until you can apply the fix.
- 11.0.0-alpha.6
- 10.6.2
- 9.1.21
- 8.6.19
Review potentially breaking changes
Due to the exceptional nature of the reported vulnerabilities, the Storybook team has decided to change the default behavior of Storybook, including versions 8 and 9, for several network-related features that are not essential to most Storybook users' workflow. If your team relies on the affected features, this document explains how to fall back to the previous behavior.
Storybook now only listens on 127.0.0.1 by default
By default, the Storybook dev server no longer binds to all network interfaces on your machine. It only binds to the loopback address 127.0.0.1. You can still open it at http://localhost:6006. This prevents other devices on the same network from seeing your Storybook server.
To share a Storybook with others, consider publishing it to Chromatic (free). To share it on a LAN without exposing the dev server, build a static Storybook with storybook build and serve the output folder with any static file server.
To share a live Storybook running in dev mode, you can use the --host CLI option to bind to the LAN IP you want to share Storybook on, e.g. storybook dev --host 192.168.0.110. Host and origin validation stays enabled with this option. If you use --host 0.0.0.0 instead, also set core.allowedHosts to the hostnames you will use. Without it, host and origin validation is disabled, and Storybook shows a warning and asks you to confirm before it starts.
Consider using a firewall to restrict incoming packets to known colleague IPs, and avoid using --host on an untrusted WiFi network.
The Vitest addon now disables browser.api.allowWrite and browser.api.allowExec
Storybook no longer allows code running in Vitest Browser mode to write to the developer’s machine or execute other processes. In the unlikely scenario that you rely on this capability in your tests, you can manually re-enable these APIs in your Vitest config.
The saveStoryRequest event validates input more strictly
Storybook strengthened input validation in saveStoryRequest, so addons and the Storybook UI can now only write serialized args and story titles. It is no longer possible to exploit input validation weaknesses to e.g. write play functions with a custom addon.
If you develop an addon that writes or edits files on users’ behalf, reach out to the Storybook team to get advice on security best practice.
Disclosure timeline
On August 19th, the Storybook team received a responsible disclosure showing that the WebSocket token can be stolen by an attacker sharing a LAN with a Storybook dev server.
The disclosure identified several actions an attacker can do. An attacker can bypass input validation to write a payload in a story file.
They can then trigger a test run via the WebSocket. If the Vitest addon is installed, the payload can exploit a Vitest API to write other files, with more exploit logic to the user’s filesystem.
Depending on the exploit content, where the file is written, and what software the developer uses, that exploit could then be executed.
Credited to KimiSecurityTeam, christos-cantina-security, Sidnioulz, ghengeveld.
Questions
- Do I need to worry if I only use localhost:6006?
Only if the server listened on all interfaces. The advisory says you are not impacted if the port is unreachable from other devices, for example when it is bound to 127.0.0.1 or a container does not publish it.
- Is a built, static Storybook affected?
No. The advisory says serving a built version of Storybook is not impacted. The flaw is in the dev server and its WebSocket.
- Is CVE-2026-114126 exploited in the wild?
The advisory reports no exploitation. It describes a private disclosure on August 19 that showed the token theft and the file-write chain, and it is not listed in CISA's KEV catalog.
- Does the Vitest addon matter?
Yes. With the Vitest addon installed, the injected story payload can use a Vitest API to write files elsewhere on disk. The risk is greater with an old Vitest version.
References
Read for this analysis:
- https://nvd.nist.gov/vuln/detail/CVE-2026-114126
- https://github.com/storybookjs/storybook/pull/36726
- https://github.com/storybookjs/storybook/commit/243c06bf8f1e2f09446c44868ea100261e1374da
- https://github.com/storybookjs/storybook/commit/3be03ec6f11f4616471cebc3fc65c13e1bf8c178
- https://github.com/storybookjs/storybook/commit/5540f03b209cc56c66f56a9c7cb4b2ee5b883ce5
- https://github.com/storybookjs/storybook/commit/a9ef9345d73224c73e0b81dc2701ec5b465ea9bb
- https://github.com/storybookjs/storybook/commit/d9b09e332510a88689c71ecc081bbbc2d072476e
- https://github.com/storybookjs/storybook/commit/df3fed468c9b4830605f00068c4bc6b7e1e215ed
- https://github.com/storybookjs/storybook/releases/tag/v10.6.2
- https://github.com/storybookjs/storybook/releases/tag/v11.0.0-alpha.6
- https://github.com/storybookjs/storybook/releases/tag/v8.6.19
- https://github.com/storybookjs/storybook/releases/tag/v9.1.21
- https://github.com/advisories/GHSA-px85-f4q5-jh77
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Other MCP servers and tools vulnerabilities
All Other MCP servers and tools entriesCVE-2026-77361
obsidian-tc : Symlink read-ACL scope bypass via lexical path checks
medium4.7Oct 23, 2026CVE-2026-113731
djust: Arbitrary absolute-path file read in the find_handlers_for_template MCP tool
low3.3Oct 21, 2026CVE-2026-114125
Storybook: Missing origin validation in Storybook preview allows code injection from malicious websites
critical9.4Oct 21, 2026CVE-2026-111770
MCP TypeScript server SDK: Shared transport or server instances delivered one HTTP client's messages to another
high7.7Oct 20, 2026GHSA-953h-535j-jg2v
agent-router: MCP session resume does not verify the embedded anti-hijacking subject; default Helm seed makes session IDs forgeable
medium6.8Oct 19, 2026CVE-2026-76894
ckan-mcp-server: DataStore Table UI resource does not validate postMessage origin (in) and posts to targetOrigin "*" (out)
low3.1Oct 16, 2026
