Storybook dev server vulnerable to code injection from the local network
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 Wi-Fi 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
Potentially breaking changes in patches
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:
- Storybook now only listens on
127.0.0.1by default: The Storybook dev server no longer binds to all network interfaces on your machine by default. It only binds to the loopback address127.0.0.1. You can still open it athttp://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 buildand serve the output folder with any static file server. - To share a live Storybook running in dev mode, use the
--hostCLI 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.0instead, also setcore.allowedHoststo 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
--hoston an untrusted Wi-Fi network.
- 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
- The Vitest addon now disables
browser.api.allowWriteandbrowser.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
saveStoryRequestevent validates input more strictly: Storybook strengthened input validation insaveStoryRequest, 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. writeplayfunctions with a custom addon. Addon developers whose tools write or edit files on users' behalf should consult the Storybook team for security best practices.
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, and 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.
What to do
Upgrade to one of the patched versions released by Storybook before running storybook dev again:
- 11.0.0-alpha.6
- 10.6.2
- 9.1.21
- 8.6.19
If you cannot upgrade immediately, do not run an affected Storybook dev server until you can apply the fix. Alternatively, ensure the dev server runs in an environment unreachable by other network devices (such as binding solely to 127.0.0.1 or running in an unexposed container) or connect only via trusted local networks.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | storybook | >= 8.0.0, < 8.6.19, >= 9.0.0, < 9.1.21, >= 10.0.0, < 10.6.2, >= 11.0.0-alpha.0, < 11.0.0-alpha.6 | 8.6.19, 9.1.21, 10.6.2, 11.0.0-alpha.6 |
| npm package | @storybook/addon-mcp | >= 10.6.0, < 10.6.2, >= 11.0.0-alpha.0, < 11.0.0-alpha.6 | 10.6.2, 11.0.0-alpha.6 |
| npm package | @storybook/addon-vitest | >= 9.0.0, < 9.1.21, >= 10.0.0, < 10.6.2, >= 11.0.0-alpha.0, < 11.0.0-alpha.6 | 9.1.21, 10.6.2, 11.0.0-alpha.6 |
| npm package | @storybook/core | >= 8.0.0, < 8.6.19 | 8.6.19 |
| npm package | @storybook/core-server | >= 8.0.0, < 8.6.19 | 8.6.19 |
| npm package | @storybook/experimental-addon-test | >= 8.0.0, < 8.6.19 | 8.6.19 |
References
- https://github.com/storybookjs/storybook/security/advisories/GHSA-px85-f4q5-jh77
- 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
- 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
- CVSS vector
CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N- Weakness (CWE)
CWE-1188, CWE-22, CWE-306, CWE-94- Platform
- npm
- Package
storybook, @storybook/addon-mcp, @storybook/addon-vitest- Disclosed
- 22.10.2026
- Updated
- 26.10.2026 10:00
Sources and licenses · Edited or translated by DockRay; source rights and applicable licenses are retained.
OSV / GitHub Advisory Database - GHSA-px85-f4q5-jh77 - CC BY 4.0
Vulnerability history: storybook
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 4
- First → latest
- 12.2025 10.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 1
- High 3
Disclosures per year
- 2025: 1
- 2026: 3
-
Storybook dev server vulnerable to code injection from the local network this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.