GHSA-px85-f4q5-jh77: Path Traversal

Published Oct 22, 2026
·
Updated

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.

Affected Software

12 affected componentsFixes available
npm/@storybook/addon-mcp>=11.0.0-alpha.0<11.0.0-alpha.6
11.0.0-alpha.6
npm/@storybook/addon-mcp>=10.6.0<10.6.2
10.6.2
npm/@storybook/addon-vitest>=11.0.0-alpha.0<11.0.0-alpha.6
11.0.0-alpha.6
npm/@storybook/addon-vitest>=10.0.0<10.6.2
10.6.2
npm/@storybook/addon-vitest>=9.0.0<9.1.21
9.1.21
npm/@storybook/experimental-addon-test>=8.0.0<8.6.19
8.6.19
npm/@storybook/core-server>=8.0.0<8.6.19
8.6.19
npm/@storybook/core>=8.0.0<8.6.19
8.6.19
npm/storybook>=11.0.0-alpha.0<11.0.0-alpha.6
11.0.0-alpha.6
npm/storybook>=10.0.0<10.6.2
10.6.2
npm/storybook>=9.0.0<9.1.21
9.1.21
npm/storybook>=8.0.0<8.6.19
8.6.19

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/@storybook/addon-mcp to a version that resolves this vulnerability.

    Fixed in 11.0.0-alpha.6
  2. Upgrade

    Upgrade npm/@storybook/addon-mcp to a version that resolves this vulnerability.

    Fixed in 10.6.2
  3. Upgrade

    Upgrade npm/@storybook/addon-vitest to a version that resolves this vulnerability.

    Fixed in 11.0.0-alpha.6
  4. Upgrade

    Upgrade npm/@storybook/addon-vitest to a version that resolves this vulnerability.

    Fixed in 10.6.2
  5. Upgrade

    Upgrade npm/@storybook/addon-vitest to a version that resolves this vulnerability.

    Fixed in 9.1.21
  6. Upgrade

    Upgrade npm/@storybook/experimental-addon-test to a version that resolves this vulnerability.

    Fixed in 8.6.19
  7. Upgrade

    Upgrade npm/@storybook/core-server to a version that resolves this vulnerability.

    Fixed in 8.6.19
  8. Upgrade

    Upgrade npm/@storybook/core to a version that resolves this vulnerability.

    Fixed in 8.6.19
  9. Upgrade

    Upgrade npm/storybook to a version that resolves this vulnerability.

    Fixed in 11.0.0-alpha.6
  10. Upgrade

    Upgrade npm/storybook to a version that resolves this vulnerability.

    Fixed in 10.6.2
  11. Upgrade

    Upgrade npm/storybook to a version that resolves this vulnerability.

    Fixed in 9.1.21
  12. Upgrade

    Upgrade npm/storybook to a version that resolves this vulnerability.

    Fixed in 8.6.19
  13. Upgrade

    Upgrade Storybook to a version that resolves this vulnerability.

    Fixed in 8.6.19
  14. Upgrade

    Upgrade Storybook to a version that resolves this vulnerability.

    Fixed in 9.1.21
  15. Upgrade

    Upgrade Storybook to a version that resolves this vulnerability.

    Fixed in 10.6.2
  16. Upgrade

    Upgrade Storybook to a version that resolves this vulnerability.

    Fixed in 11.0.0-alpha.6
  17. Configuration

    If using --host 0.0.0.0, set core.allowedHosts to the hostnames you will use; host and origin validation remains enabled with this option.

    Storybook dev server core.allowedHosts = the hostnames you will use
  18. Configuration

    Only if required by tests, manually re-enable browser.api.allowWrite and browser.api.allowExec in the Vitest configuration.

    Vitest addon browser.api.allowWrite and browser.api.allowExec = true
  19. Compensating control

    Use a firewall to restrict incoming packets to known colleague IPs, and avoid using --host on an untrusted WiFi network.

  20. Compensating control

    If you cannot upgrade immediately, do not run an affected Storybook dev server until the fix is applied.

  21. Compensating control

    To share Storybook without exposing the dev server, build a static Storybook with storybook build and serve the output folder with a static file server.

Event History

Oct 22, 2026
Advisory Published
via GitHub·04:31 PM
Data Sourced
via GitHub·04:31 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are not exposed to this issue?

A Storybook dev server is not exposed when other devices cannot reach it, such as when it runs in a container without a published Storybook port or with the port bound only to 127.0.0.1. Serving a built version of Storybook is also not affected.

2

What network access does an attacker need?

The attacker needs to be able to reach the Storybook dev server over the local network and load its HTML pages, for example by opening the application through its IP address. This is relevant on untrusted LANs or a Wi-Fi access point impersonating a trusted network.

3

Does the Vitest addon change the potential impact?

Yes. The advisory states that impact is more significant when the Vitest addon is installed and an old version of Vitest is in use.

4

What can be done before an upgrade is available or completed?

Prevent other devices from reaching the Storybook dev server, such as by avoiding publication of its container port or binding it only to 127.0.0.1. Avoid running the dev server on untrusted local networks or potentially malicious Wi-Fi access points.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203