GHSA-PX85-F4Q5-JH77

Vulnerability from github – Published: 2026-10-22 16:31 – Updated: 2026-10-22 16:31
VLAI
Summary
Storybook dev server vulnerable to code injection from the local network
Details

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.

Show details on source website

{
  "affected": [
    {
      "package": {
        "ecosystem": "npm",
        "name": "storybook"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "8.0.0"
            },
            {
              "fixed": "8.6.19"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "storybook"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "9.0.0"
            },
            {
              "fixed": "9.1.21"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "storybook"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "10.0.0"
            },
            {
              "fixed": "10.6.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "storybook"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "11.0.0-alpha.0"
            },
            {
              "fixed": "11.0.0-alpha.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "@storybook/core"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "8.0.0"
            },
            {
              "fixed": "8.6.19"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "@storybook/core-server"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "8.0.0"
            },
            {
              "fixed": "8.6.19"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "@storybook/experimental-addon-test"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "8.0.0"
            },
            {
              "fixed": "8.6.19"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "@storybook/addon-vitest"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "9.0.0"
            },
            {
              "fixed": "9.1.21"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "@storybook/addon-vitest"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "10.0.0"
            },
            {
              "fixed": "10.6.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "@storybook/addon-vitest"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "11.0.0-alpha.0"
            },
            {
              "fixed": "11.0.0-alpha.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "@storybook/addon-mcp"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "10.6.0"
            },
            {
              "fixed": "10.6.2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "npm",
        "name": "@storybook/addon-mcp"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "11.0.0-alpha.0"
            },
            {
              "fixed": "11.0.0-alpha.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-114126"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1188",
      "CWE-22",
      "CWE-306",
      "CWE-94"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-22T16:31:40Z",
    "nvd_published_at": "2026-10-21T18:17:25Z",
    "severity": "HIGH"
  },
  "details": "**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.\n\n## Who is impacted?\n\nYou 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.\n\nYou are not impacted if:\n\n- 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`)\n- You run a dev server whilst connected to a trusted local network\n- You serve a built version of Storybook on your machine\n\n## Recommended actions\n\n### Upgrade Storybook\n\nStorybook has released patched versions of all affected major Storybook versions that fix all the vulnerabilities necessary for the worst-case scenario above to occur. \n\nUpgrade 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.\n\n- 11.0.0-alpha.6\n- 10.6.2\n- 9.1.21\n- 8.6.19\n\n### Review potentially breaking changes\n\nDue 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\u0027 workflow. If your team relies on the affected features, this document explains how to fall back to the previous behavior.\n\n#### Storybook now only listens on `127.0.0.1` by default\n\nBy 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.\n\nTo 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.\n\nTo 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.\n\nConsider using a firewall to restrict incoming packets to known colleague IPs, and avoid using `--host` on an untrusted WiFi network.\n\n#### The Vitest addon now disables `browser.api.allowWrite` and `browser.api.allowExec`\n\nStorybook no longer allows code running in Vitest Browser mode to write to the developer\u2019s 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.\n\n#### The `saveStoryRequest` event validates input more strictly\n\nStorybook 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.\n\nIf you develop an addon that writes or edits files on users\u2019 behalf, reach out to the Storybook team to get advice on security best practice.\n\n## Disclosure timeline\n\nOn 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.\n\nThe disclosure identified several actions an attacker can do. An attacker can bypass input validation to write a payload in a story file.\n\nThey 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\u2019s filesystem.\n\nDepending on the exploit content, where the file is written, and what software the developer uses, that exploit could then be executed.",
  "id": "GHSA-px85-f4q5-jh77",
  "modified": "2026-10-22T16:31:40Z",
  "published": "2026-10-22T16:31:40Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/storybookjs/storybook/security/advisories/GHSA-px85-f4q5-jh77"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-114126"
    },
    {
      "type": "WEB",
      "url": "https://github.com/storybookjs/storybook/pull/36726"
    },
    {
      "type": "WEB",
      "url": "https://github.com/storybookjs/storybook/commit/243c06bf8f1e2f09446c44868ea100261e1374da"
    },
    {
      "type": "WEB",
      "url": "https://github.com/storybookjs/storybook/commit/3be03ec6f11f4616471cebc3fc65c13e1bf8c178"
    },
    {
      "type": "WEB",
      "url": "https://github.com/storybookjs/storybook/commit/5540f03b209cc56c66f56a9c7cb4b2ee5b883ce5"
    },
    {
      "type": "WEB",
      "url": "https://github.com/storybookjs/storybook/commit/a9ef9345d73224c73e0b81dc2701ec5b465ea9bb"
    },
    {
      "type": "WEB",
      "url": "https://github.com/storybookjs/storybook/commit/d9b09e332510a88689c71ecc081bbbc2d072476e"
    },
    {
      "type": "WEB",
      "url": "https://github.com/storybookjs/storybook/commit/df3fed468c9b4830605f00068c4bc6b7e1e215ed"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/storybookjs/storybook"
    },
    {
      "type": "WEB",
      "url": "https://github.com/storybookjs/storybook/releases/tag/v10.6.2"
    },
    {
      "type": "WEB",
      "url": "https://github.com/storybookjs/storybook/releases/tag/v11.0.0-alpha.6"
    },
    {
      "type": "WEB",
      "url": "https://github.com/storybookjs/storybook/releases/tag/v8.6.19"
    },
    {
      "type": "WEB",
      "url": "https://github.com/storybookjs/storybook/releases/tag/v9.1.21"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Storybook dev server vulnerable to code injection from the local network"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.