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

CVE-2026-114126: Storybook WebSocket RCE Vulnerability

CVE-2026-114126 is a remote code execution flaw in Storybook development server that allows LAN attackers to obtain WebSocket tokens and execute arbitrary code. This post explains its impact, 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-114126 Overview

CVE-2026-114126 affects Storybook, a frontend workshop for building user interface components and pages in isolation. The Storybook development server exposes its WebSocket authentication token to any client capable of loading its HTML pages over a local network. An attacker on the same LAN can harvest the token and invoke WebSocket-backed file-writing or testing functionality. The flaw affects versions from 8.0.0 through 8.6.19, 9.1.21, 10.6.2, and 11.0.0-alpha.6. The vulnerability is classified under [CWE-22] (Path Traversal) and received a CVSS v4.0 score of 8.7.

Critical Impact

A LAN-based attacker can write arbitrary content into story files and, when the Storybook Vitest addon is installed with an outdated Vitest version, achieve code execution with the developer's privileges.

Affected Products

  • Storybook 8.0.0 through 8.6.18 (fixed in 8.6.19)
  • Storybook 9.x through 9.1.20 (fixed in 9.1.21)
  • Storybook 10.x through 10.6.1 (fixed in 10.6.2) and 11.0.0-alpha.x (fixed in 11.0.0-alpha.6)

Discovery Timeline

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

Technical Details for CVE-2026-114126

Vulnerability Analysis

Storybook's development server authenticates WebSocket connections with a token embedded in its served HTML pages. Because the dev server binds to accessible interfaces, any client on the local network that can reach the server can request those pages and extract the token. Once the attacker holds a valid token, they can connect to the WebSocket channel and invoke privileged backend operations the server exposes for the local developer.

Among those operations is a story-write endpoint used by Storybook to persist edits made in the UI. Validation on this endpoint is insufficient, allowing an attacker to place crafted content inside story files on disk. If the project additionally installs the Storybook Vitest addon with an older Vitest release, the attacker can leverage a Vitest browser API that permits arbitrary file writes or command execution during a test run.

Root Cause

Two weaknesses combine. First, the WebSocket authentication token is delivered through pages reachable by any LAN peer, which violates the implicit trust model that only the local developer can reach the dev server. Second, the write path for story files does not sufficiently validate content or destination, matching [CWE-22] Path Traversal semantics for untrusted writes into developer-controlled source files.

Attack Vector

The attack requires only adjacent-network access, no privileges, and no user interaction. An attacker on the same Wi-Fi or wired segment loads a Storybook HTML page, parses out the WebSocket token, then opens a WebSocket to the dev server. From there, the attacker issues story-write messages to drop a payload into a .stories.* file. If the Vitest addon runs the planted story on an outdated Vitest, the payload reaches a browser API that writes additional files or executes shell commands under the developer's account.

typescript
// Patch excerpt: code/core/src/core-server/utils/server-address.ts
// Re-reads network interfaces on each call rather than caching at module load,
// improving the server address logic exercised by the fix.
return `${https ? 'wss' : 'ws'}://127.0.0.1:${port}${SERVER_CHANNEL_PATH}`;

const getExternalIpv4Addresses = () =>
  Object.values(os.networkInterfaces())
    .flat()
    .filter((ip) => ip && ip.family === 'IPv4' && !ip.internal)
    .map((ip) => ip!.address);
// Source: https://github.com/storybookjs/storybook/commit/5540f03b209cc56c66f56a9c7cb4b2ee5b883ce5

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-114126

Indicators of Compromise

  • Unexpected modifications to *.stories.ts, *.stories.tsx, *.stories.js, or *.stories.mdx files that developers did not author.
  • Outbound or lateral WebSocket connections to a developer workstation's Storybook port from a non-loopback source IP.
  • New or altered files appearing in the project workspace during a Vitest run initiated through Storybook.
  • Child processes spawned by node, vitest, or the Storybook CLI that execute shell commands outside the normal test workflow.

Detection Strategies

  • Monitor developer endpoints for storybook dev processes bound to non-loopback interfaces and alert when remote peers establish WebSocket sessions.
  • Baseline the file-write activity of Vitest and Storybook processes, then flag writes targeting paths outside expected test and story directories.
  • Correlate HTTP requests to Storybook preview pages from LAN peers with subsequent WebSocket upgrades from the same source IP.

Monitoring Recommendations

  • Enable endpoint telemetry on developer laptops to capture process creation, network listeners, and file-write events for node-based tooling.
  • Track versions of storybook, @storybook/addon-vitest, and vitest across repositories using software composition analysis.
  • Review proxy and VPN logs for untrusted devices reaching Storybook default ports such as 6006 on developer segments.

How to Mitigate CVE-2026-114126

Immediate Actions Required

  • Upgrade Storybook to 8.6.19, 9.1.21, 10.6.2, or 11.0.0-alpha.6 depending on the release line in use.
  • Update the Storybook Vitest addon and Vitest itself to current supported releases that enforce browser API permissions.
  • Bind the Storybook development server to 127.0.0.1 rather than 0.0.0.0 and avoid exposing it over shared networks.
  • Audit recently modified story files in affected repositories for unexpected content prior to running tests.

Patch Information

The fix is distributed in Storybook v8.6.19, v9.1.21, v10.6.2, and v11.0.0-alpha.6. Technical specifics are documented in GHSA-px85-f4q5-jh77 and merged through Pull Request 36726.

Workarounds

  • Run Storybook only on isolated or loopback-only network interfaces until patched versions are deployed.
  • Disable or remove the Storybook Vitest addon on projects that cannot immediately upgrade.
  • Use host-based firewall rules to block inbound connections to Storybook ports from any address other than 127.0.0.1.
bash
# Upgrade to patched Storybook releases
npm install --save-dev storybook@9.1.21
# or for the 10.x line
npm install --save-dev storybook@10.6.2

# Restrict Storybook dev server to loopback
npx storybook dev -p 6006 --host 127.0.0.1

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.