CVE-2026-114125: Storybook: Missing origin validation in Storybook preview allows code injection from malicious websites
Storybook's dev server does not validate the origin of messages sent to its preview iframe. A malicious website can embed the preview and make the dev server change story files in your project, which can lead to code execution if a local runtime runs the changed file. Upgrade to 8.6.19, 9.1.21, 10.6.2 or 11.0.0-alpha.6.
Published Oct 21, 2026 · Analysis Oct 22, 2026
What an attacker can do
The preview iframe of a running storybook dev server accepts postMessage events from any website, and the highlight event was permissive enough to trigger arbitrary events that the dev server processes. An attacker-controlled page can frame the preview, send those events, and cause unauthorized writes to story files. The advisory calls this a chain of several weaknesses (origin validation, missing authorization, path handling, code injection).
The worst case needs user interaction: the developer must visit the attacker's page while the dev server runs. If a local runtime such as a test runner then executes the modified file, the attacker gets arbitrary code execution with the developer's privileges. Storybook says it has no evidence of exploitation in real projects. Recent Chrome and Firefox may prompt before a site can reach a localhost service, which reduces but does not remove the risk.
You are not affected if the dev server is never opened in a browser (headless automation, MCP clients) or if you only run or visit a built Storybook.
Who is affected
Affected: storybook from 8.0.0 before 8.6.19, 9.0.0 before 9.1.21, 10.0.0 before 10.6.2, and 11.0.0-alpha.0 before 11.0.0-alpha.6. The same ranges apply to @storybook/core, @storybook/core-server and @storybook/experimental-addon-test (8.x), @storybook/addon-vitest (9.x and later), and @storybook/addon-mcp (10.6.0 and later). Only the dev server is affected.
Check your versions:
npm ls storybook @storybook/addon-vitest @storybook/addon-mcpstorybook
- 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 8.6.19, 9.1.21, 10.6.2 or 11.0.0-alpha.6, matching your major version, before running storybook dev again. If you cannot upgrade, do not run an affected dev server.
The patch changes defaults. Iframe embedding from another host is off, and the preview and manager only exchange postMessage with their own origin and other localhost services. The highlight event signature changed, so update the Chromatic Visual Tests addon to 5.5.1 or later. Feature flags security.insecureRemoteIframeEmbed and security.insecureIframeMessaging re-enable the old behavior; avoid them. Composed Storybooks on other origins must now be built.
How to tell if you were hit
Look for unexpected changes to story files or other project files made while a dev server was running, using git status and git diff on files such as *.stories.*. Check for unfamiliar code in files a test runner or Vitest executes. Review browser history for untrusted sites visited during dev sessions. Beam records agent shell commands and file access, so it can show whether a changed file was later run by an agent.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
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.
Credited to agent-killjoy, Sidnioulz, ghengeveld.
Questions
- Is Storybook vulnerable if I only use a built or deployed Storybook?
No. The advisory says built versions of Storybook are not impacted. Only a running
storybook devserver that you open in a web browser is exposed.- Does CVE-2026-114125 need user interaction?
Yes. The CVSS vector sets UI:P. The developer has to visit a malicious website while the dev server is running, and the worst-case code execution also needs a local runtime to execute the changed file.
- Is this exploited in the wild?
Storybook says it is not aware of exploitation and has no evidence of attacks on real projects. It is not in the CISA KEV catalog.
References
Read for this analysis:
- https://github.com/advisories/GHSA-f2ph-cmg5-wxc8
- https://github.com/storybookjs/storybook/releases/tag/v10.6.2
- https://github.com/storybookjs/storybook/security/advisories/GHSA-f2ph-cmg5-wxc8
- 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/a9ef9345d73224c73e0b81dc2701ec5b465ea9bb
- https://github.com/storybookjs/storybook/commit/d9b09e332510a88689c71ecc081bbbc2d072476e
- https://github.com/storybookjs/storybook/commit/df3fed468c9b4830605f00068c4bc6b7e1e215ed
- 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
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-114126
Storybook dev server vulnerable to code injection from the local network
high8.7Oct 22, 2026CVE-2026-113731
djust: Arbitrary absolute-path file read in the find_handlers_for_template MCP tool
low3.3Oct 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
