GHSA-F2PH-CMG5-WXC8

Vulnerability from github – Published: 2026-10-21 17:23 – Updated: 2026-10-21 17:23
VLAI
Summary
Storybook: Missing origin validation in Storybook preview allows code injection from malicious websites
Details

Summary: A malicious website may be able to cause unauthorized file changes in a developer’s project while an affected Storybook development server is running. Under additional conditions, a changed file could be executed by a local runtime with the developer’s privileges. We are not aware of exploitation in the wild.

Who is impacted?

You are impacted if you run a Storybook dev server in the affected versions.

You are not impacted if:

  • You run a dev server that you never open in a web browser (e.g. headless automation, MCP clients)
  • You run or visit a built version of Storybook

Recent versions of Chrome and Firefox may ask for permission before a website can connect to a localhost service. This reduces the risk, but does not remove it. Do not grant this permission to websites you don’t trust.

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, we've added feature flags that can disable specific security updates to support your existing workflows.

Please carefully read the introduced flags and the consequences of using them.

Iframe embedding over the network is disabled by default

Storybook no longer allows the manager or preview to be embedded as an iframe on a website with a different host name. Built versions of Storybook are unaffected and can be freely embedded.

If you rely on embedding a Storybook dev server through a separate web app, run that separate app on localhost. You may also use the security.insecureRemoteIframeEmbed feature flag to re-enable iframe embedding from any origin.

The preview iframe rejects messages sent by an unknown host

Both the Storybook preview and manager now restrict the origin of iframes and parent windows that they can send messages to and receive messages from using the postMessage API.

By default, Storybook in dev mode only accepts communication with its own origin and other localhost services. Built Storybooks continue to accept communication from unknown origins.

A Storybook addon or integration could hypothetically rely on postMessage to update a live story's args. If you do that, reach out to the Storybook team to explore safer alternatives.

Storybook composition also relies on postMessage, so a composed Storybook on a different origin now fails to load unless it has been built. The security.insecureIframeMessaging feature flag disables this protection, but we recommend you build composed Storybooks instead.

The highlight event signature has changed

Storybook’s own accessibility addon uses the highlight event to inject highlights into the preview, which a user can click. Clicking the highlight opens a menu with a link to a documentation page.

The API for that event was too permissive and could be used to trigger arbitrary events, including events processed by the user’s dev server. We reworked the API to prevent abuse. Besides the accessibility addon, Chromatic's Visual Tests addon uses this API to link to documentation from highlighted ignored elements. Update the Visual Tests addon to version 5.5.1 or later to keep that link working. Because no other addons use this API as far as we know, we have not added a feature flag to restore the old API.

Disclosure timeline

On September 30th, the Storybook team received a responsible disclosure showing how a malicious website can embed a Storybook dev server's preview iframe and send events to the dev server on the developer's machine.

They combined this information with findings from an ongoing security audit to come up with a worst-case-scenario exploitation of the disclosed vulnerability, and the ones we independently discovered. They then worked to address all layers necessary for this worst-case scenario to happen. We have not received evidence of exploitation in real Storybook projects. The attack outlined in this advisory relies on correctly exploiting a sequence of many vulnerabilities, some of which were never disclosed to the Storybook team.

Worst-case attack scenario

An attacker-controlled website can interact with the preview of a running Storybook dev server. With user interaction, it may cause the dev server to make unauthorized changes to story files. If a malicious file is subsequently executed by a local runtime, the attack could lead to arbitrary code execution with the developer’s permissions.

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-114125"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-1021",
      "CWE-22",
      "CWE-346",
      "CWE-441",
      "CWE-749",
      "CWE-862",
      "CWE-94",
      "CWE-96"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-10-21T17:23:29Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
  },
  "details": "**Summary:** A malicious website may be able to cause unauthorized file changes in a developer\u2019s project while an affected Storybook development server is running. Under additional conditions, a changed file could be executed by a local runtime with the developer\u2019s privileges. We are not aware of exploitation in the wild.\n\n## Who is impacted?\n\nYou are impacted if you run a Storybook dev server in the affected versions.\n\nYou are not impacted if:\n\n- You run a dev server that you never open in a web browser (e.g. headless automation, MCP clients)\n- You run or visit a built version of Storybook\n\nRecent versions of Chrome and Firefox may ask for permission before a website can connect to a `localhost` service. This reduces the risk, but does not remove it. Do not grant this permission to websites you don\u2019t trust.\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, we\u0027ve added feature flags that can disable specific security updates to support your existing workflows.\n\nPlease carefully read the introduced flags and the consequences of using them.\n\n#### Iframe embedding over the network is disabled by default\n\nStorybook no longer allows the manager or preview to be embedded as an iframe on a website with a different host name. Built versions of Storybook are unaffected and can be freely embedded.\n\nIf you rely on embedding a Storybook dev server through a separate web app, run that separate app on `localhost`. You may also use the `security.insecureRemoteIframeEmbed` feature flag to re-enable iframe embedding from any origin.\n\n#### The preview iframe rejects messages sent by an unknown host\n\nBoth the Storybook preview and manager now restrict the origin of iframes and parent windows that they can send messages to and receive messages from using the `postMessage` API.\n\nBy default, Storybook in dev mode only accepts communication with its own origin and other `localhost` services. Built Storybooks continue to accept communication from unknown origins.\n\nA Storybook addon or integration could hypothetically rely on `postMessage` to update a live story\u0027s args. If you do that, reach out to the Storybook team to explore safer alternatives.\n\nStorybook composition also relies on `postMessage`, so a composed Storybook on a different origin now fails to load unless it has been built. The `security.insecureIframeMessaging` feature flag disables this protection, but we recommend you build composed Storybooks instead.\n\n#### The `highlight` event signature has changed\n\nStorybook\u2019s own accessibility addon uses the `highlight` event to inject highlights into the preview, which a user can click. Clicking the highlight opens a menu with a link to a documentation page.\n\nThe API for that event was too permissive and could be used to trigger arbitrary events, including events processed by the user\u2019s dev server. We reworked the API to prevent abuse. Besides the accessibility addon, Chromatic\u0027s Visual Tests addon uses this API to link to documentation from highlighted ignored elements. Update the Visual Tests addon to version 5.5.1 or later to keep that link working. Because no other addons use this API as far as we know, we have not added a feature flag to restore the old API.\n\n## Disclosure timeline\n\nOn September 30th, the Storybook team received a responsible disclosure showing how a malicious website can embed a Storybook dev server\u0027s preview iframe and send events to the dev server on the developer\u0027s machine.\n\nThey combined this information with findings from an ongoing security audit to come up with a worst-case-scenario exploitation of the disclosed vulnerability, and the ones we independently discovered. They then worked to address all layers necessary for this worst-case scenario to happen. We have not received evidence of exploitation in real Storybook projects. The attack outlined in this advisory relies on correctly exploiting a sequence of many vulnerabilities, some of which were never disclosed to the Storybook team.\n\n### Worst-case attack scenario\n\nAn attacker-controlled website can interact with the preview of a running Storybook dev server. With user interaction, it may cause the dev server to make unauthorized changes to story files. If a malicious file is subsequently executed by a local runtime, the attack could lead to arbitrary code execution with the developer\u2019s permissions.",
  "id": "GHSA-f2ph-cmg5-wxc8",
  "modified": "2026-10-21T17:23:29Z",
  "published": "2026-10-21T17:23:29Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/storybookjs/storybook/security/advisories/GHSA-f2ph-cmg5-wxc8"
    },
    {
      "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/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:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Storybook: Missing origin validation in Storybook preview allows code injection from malicious websites"
}



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.