Skip to main content
Vulnerability Database/CVE-2026-114125

CVE-2026-114125: Storybook Development Server RCE Vulnerability

CVE-2026-114125 is a remote code execution vulnerability in Storybook development servers allowing malicious websites to inject unauthorized code. This post covers the technical details, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-114125 Overview

CVE-2026-114125 affects Storybook, a widely used frontend workshop for building and testing UI components in isolation. The flaw allows a malicious website to interact with a running Storybook development server through insufficient iframe embedding restrictions and missing message-origin validation. An attacker-controlled page can send events that reach the running preview, modify story files on disk, and ultimately achieve arbitrary code execution in the developer's local environment if a tampered file is later executed by a local runtime. The vulnerability is tracked under CWE-94: Improper Control of Generation of Code and is fixed in Storybook 8.6.19, 9.1.21, 10.6.2, and 11.0.0-alpha.6.

Critical Impact

A developer who visits a malicious site while running Storybook locally can have their story files modified and, upon next execution, suffer arbitrary code execution with their own user privileges.

Affected Products

  • Storybook versions 8.0.0 through 8.6.18
  • Storybook versions 9.0.0 through 9.1.20
  • Storybook versions 10.0.0 through 10.6.1 and pre-release 11.0.0-alpha.5 and earlier

Discovery Timeline

  • 2026-10-21 - CVE-2026-114125 published to NVD
  • 2026-10-22 - Last updated in NVD database

Technical Details for CVE-2026-114125

Vulnerability Analysis

Storybook runs a local development server with a manager UI that embeds a preview iframe for rendering stories. The manager and preview communicate using postMessage-based channel events. In affected versions, the manager accepts channel messages from any origin as long as the sender matches a registered preview iframe by event.source. The event.source reference survives navigation, so a preview iframe that is tricked into navigating to attacker-controlled content continues to be trusted. Combined with insufficient iframe embedding restrictions, a malicious page can frame or interact with the Storybook preview and deliver forged events, including events that trigger story file writes through legitimate Storybook features.

Root Cause

The root cause is improper validation of message origins in the postmessage channel, together with missing clickjacking-style embedding protections for the preview. The isAllowedToContactManager check in code/core/src/channels/postmessage/index.ts validated the sender frame but did not pin the expected origin of registered preview iframes. As a result, cross-origin content loaded into a trusted iframe reference could pass the trust check and emit channel events the manager would act on.

Attack Vector

Exploitation requires a developer running a vulnerable Storybook dev server to visit an attacker-controlled page and interact with the injected interface. The attacker page triggers crafted channel messages that reach the running preview, cause unauthorized modifications to story files on disk, and set up a payload. When the developer or a tool such as a test runner later executes the modified story file, code runs with the developer's privileges. This can lead to local file access, credential theft from the developer workstation, or lateral movement into internal systems.

typescript
// Security patch in code/core/src/channels/postmessage/index.ts
// Core: Check the origin of channel messages from registered preview iframes
private isAllowedToContactManager(rawEvent: MessageEvent): boolean {
  const senderFrame = rawEvent.source
    ? Array.from(document.querySelectorAll('iframe')).find(
        (frame) => frame.contentWindow === rawEvent.source
      )
    : undefined;
  if (senderFrame?.hasAttribute('data-is-storybook')) {
    if (!this.pinsTargetOrigin) {
      return true;
    }
    const expectedOrigin = this.getIframeTargetOrigin(senderFrame);
    if (expectedOrigin === '*' || expectedOrigin === rawEvent.origin) {
      return true;
    }
    this.warnOnceAboutRejectedSender(
      rawEvent,
      `Ignored Storybook channel message from a registered preview iframe that is on origin ` +
        `"${rawEvent.origin}" instead of "${expectedOrigin}".`
    );
    return false;
  }
}

Source: GitHub Commit 97513d9

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-114125

Indicators of Compromise

  • Unexpected modifications to *.stories.ts, *.stories.tsx, *.stories.js, or related story files in developer repositories, especially outside normal commit workflows.
  • Browser history or proxy logs showing developer workstations visiting unknown third-party sites while a local Storybook port (commonly 6006) is listening.
  • Child processes spawned by Node.js test runners or storybook CLI executing shell commands, downloaders, or outbound network connections.

Detection Strategies

  • Monitor developer endpoints for Node.js processes spawning unexpected child processes such as sh, cmd.exe, powershell.exe, or network utilities during Storybook sessions.
  • Use endpoint telemetry to correlate browser activity on uncategorized domains with concurrent file writes to source-controlled story directories.
  • Enable version control pre-commit review and code owner alerts on story files to surface unauthorized changes before they are executed.

Monitoring Recommendations

  • Alert on outbound connections from developer machines to newly observed domains while localhost:6006 or configured Storybook ports are active.
  • Track installed storybook package versions across engineering workstations and flag versions below 8.6.19, 9.1.21, or 10.6.2.
  • Review browser extension and iframe-embedding policies to detect pages framing localhost origins.

How to Mitigate CVE-2026-114125

Immediate Actions Required

  • Upgrade Storybook to 8.6.19, 9.1.21, 10.6.2, or 11.0.0-alpha.6 across all developer workstations and CI pipelines.
  • Instruct developers to stop running Storybook dev servers while browsing untrusted sites until patches are applied.
  • Audit recent changes to story files in affected repositories for unauthorized modifications and revert suspicious commits.

Patch Information

The maintainers released fixes in the GitHub Security Advisory GHSA-f2ph-cmg5-wxc8. The patches, tracked in GitHub Pull Request #36726 and commits 97513d9, 243c06b, 3be03ec, d9b09e3, and df3fed4, enforce target origin pinning on channel messages, remove the exploitable SELECT event from the a11y addon, and tighten iframe embedding restrictions. Fixed builds are available in GitHub Release v8.6.19, GitHub Release v9.1.21, GitHub Release v10.6.2, and GitHub Release v11.0.0-alpha.6.

Workarounds

  • Bind the Storybook dev server to localhost only and avoid exposing it on routable network interfaces.
  • Shut down the Storybook dev server when not actively developing, and use a browser profile dedicated to development with no general browsing.
  • Enforce workstation browser policies that restrict framing of localhost origins and apply strict Content-Security-Policy directives such as frame-ancestors 'none' in reverse-proxied Storybook deployments.
bash
# Upgrade Storybook to a patched version using your package manager
npm install --save-dev storybook@^8.6.19
# or for the 9.x line
npm install --save-dev storybook@^9.1.21
# or for the 10.x line
npm install --save-dev storybook@^10.6.2

# Verify the installed version
npx storybook --version

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.