CVE-2026-27148
JSON

8.9high

Storybook Dev Server Vulnerable to WebSocket Hijacking

Severity
8.9high CVSS:4.0 by GitHub_M
Exploit likelihood
0.75% (higher than 51% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-mjf5-7g4m-gx5w

Description

Storybook is a frontend workshop for building user interface components and pages in isolation. Prior to versions 7.6.23, 8.6.17, 9.1.19, and 10.2.10, the WebSocket functionality in Storybook's dev server, used to create and update stories, is vulnerable to WebSocket hijacking. This vulnerability only affects the Storybook dev server; production builds are not impacted. Exploitation requires a developer to visit a malicious website while their local Storybook dev server is running. Because the WebSocket connection does not validate the origin of incoming connections, a malicious site can silently send WebSocket messages to the local instance without any further user interaction. If the Storybook dev server is intentionally exposed publicly (e.g. for design reviews or stakeholder demos) the risk is higher, as no malicious site visit is required. Any unauthenticated attacker can send WebSocket messages to it directly. The vulnerability affects the WebSocket message handlers for creating and saving stories. Both are vulnerable to injection via unsanitized input in the componentFilePath field, which can be exploited to achieve persistent XSS or Remote Code Execution (RCE). Versions 7.6.23, 8.6.17, 9.1.19, and 10.2.10 contain a fix for the issue.

Affected

Product or packageVersionsReported by
storybookjs storybook< 7.6.23, >= 8.1.0, < 8.6.17, >= 9.0.0, < 9.1.19, >= 10.0.0, < 10.2.10CVE List
grafanaNot specifiedCVE List
com.github.streamshub-consoleNot specifiedCVE List
storybook (npm)from 8.1.0 before 8.6.17, from 8.7.0-alpha.0 before 9.1.19, from 10.0.0-beta.0 before 10.2.10GitHub Advisory Database
storybook storybookbefore 7.6.23, from 8.1.0 before 8.6.17, from 9.0.0 before 9.1.19, from 10.0.0 before 10.2.10NVD

All scores

GitHub_M8.9high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
redhat-SADP8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
NVD9.6critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H

Classification

CWE-74CWE-79CWE-346CWE-1385

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

Storybook is a frontend workshop for building user interface components and pages in isolation. Prior to versions 7.6.23, 8.6.17, 9.1.19, and 10.2.10, the WebSocket functionality in Storybook's dev server, used to create and update stories, is vulnerable to WebSocket hijacking. This vulnerability only affects the Storybook dev server; production builds are not impacted. Exploitation requires a developer to visit a malicious website while their local Storybook dev server is running. Because the WebSocket connection does not validate the origin of incoming connections, a malicious site can silently send WebSocket messages to the local instance without any further user interaction. If the Storybook dev server is intentionally exposed publicly (e.g. for design reviews or stakeholder demos) the risk is higher, as no malicious site visit is required. Any unauthenticated attacker can send WebSocket messages to it directly. The vulnerability affects the WebSocket message handlers for creating and saving stories. Both are vulnerable to injection via unsanitized input in the componentFilePath field, which can be exploited to achieve persistent XSS or Remote Code Execution (RCE). Versions 7.6.23, 8.6.17, 9.1.19, and 10.2.10 contain a fix for the issue.

GitHub Advisory Database
Summary

The WebSocket functionality in Storybook's dev server, used to create and update stories, is vulnerable to WebSocket hijacking. This vulnerability only affects the Storybook dev server; production builds are not impacted.

Details

Exploitation requires a developer to visit a malicious website while their local Storybook dev server is running. Because the WebSocket connection does not validate the origin of incoming connections, a malicious site can silently send WebSocket messages to the local instance without any further user interaction.

If a Storybook dev server is intentionally exposed publicly (e.g. for design reviews or stakeholder demos) the risk is higher, as no malicious site visit is required. Any unauthenticated attacker can send WebSocket messages to it directly.

The vulnerability affects the WebSocket message handlers for creating and saving stories, which can be exploited via unauthorized WebSocket connections to achieve persistent XSS or Remote Code Execution (RCE).

Note: recent versions of Chrome have some protections against this, but Firefox does not.

Impact

This vulnerability can lead to supply chain compromise. Key risks include:

  • Remote Code Execution: The vulnerability can allow attackers to execute malicious code, with the extent of impact depending on the configuration. Server-side RCE is possible in non-default configurations, such as when stories are executed via portable stories in JSDOM, potentially allowing attackers to exfiltrate credentials and environment variables, access source code and the filesystem, establish backdoors, or pivot to internal network resources.
  • Persistent XSS: Malicious payloads are written directly into story source files. If the malicious payload is committed to version control, it becomes part of the codebase and can propagate to deployed Storybook documentation sites, affecting developers and stakeholders who view them.
  • Supply Chain Propagation: If the modified source files are committed, injected code can spread to other team members via git, execute in CI/CD pipelines, and affect shared component libraries used across multiple projects.
Affected versions

8.1 and above. While the exploitable functionality was introduced in 8.1, the patch has been applied to 7.x as a precautionary measure given the underlying WebSocket behaviour.

Recommended actions

Update to one of the patched versions: 7.6.23, 8.6.17, 9.1.19, 10.2.10.

NVD (es)

Storybook es un taller de frontend para construir componentes de interfaz de usuario y páginas de forma aislada. Anteriormente a las versiones 7.6.23, 8.6.17, 9.1.19 y 10.2.10, la funcionalidad WebSocket en el servidor de desarrollo de Storybook, utilizada para crear y actualizar historias, es vulnerable a secuestro de WebSocket. Esta vulnerabilidad solo afecta al servidor de desarrollo de Storybook; las compilaciones de producción no se ven afectadas. La explotación requiere que un desarrollador visite un sitio web malicioso mientras su servidor de desarrollo local de Storybook está en ejecución. Debido a que la conexión WebSocket no valida el origen de las conexiones entrantes, un sitio malicioso puede enviar silenciosamente mensajes WebSocket a la instancia local sin ninguna interacción adicional del usuario. Si el servidor de desarrollo de Storybook se expone intencionalmente al público (por ejemplo, para revisiones de diseño o demostraciones a partes interesadas) el riesgo es mayor, ya que no se requiere la visita a un sitio malicioso. Cualquier atacante no autenticado puede enviarle mensajes WebSocket directamente. La vulnerabilidad afecta a los manejadores de mensajes WebSocket para crear y guardar historias. Ambos son vulnerables a la inyección a través de entrada no saneada en el campo componentFilePath, lo que puede ser explotado para lograr XSS persistente o Ejecución Remota de Código (RCE). Las versiones 7.6.23, 8.6.17, 9.1.19 y 10.2.10 contienen una solución para el problema.

References

https://github.com/storybookjs/storybook/security/advisories/GHSA-mjf5-7g4m-gx5wvendor-advisory, web
https://github.com/storybookjs/storybook/commit/0affdf928bd6fafbadfb1dfe22ce6104805e10e8patch, web
https://github.com/storybookjs/storybook/commit/54689a8add18ea75d628c540f4bc677592a1e685patch, web
https://github.com/storybookjs/storybook/commit/b8cfa77c73940c140acdcd8a06ab1ea913c44761patch, web
https://github.com/storybookjs/storybook/commit/d34085f39c647f5c23c3a3b2d197c18602fcf876patch, web
https://github.com/storybookjs/storybook/releases/tag/v10.2.10release-notes, web
https://github.com/storybookjs/storybook/releases/tag/v7.6.23release-notes, web
https://github.com/storybookjs/storybook/releases/tag/v8.6.17release-notes, web
https://github.com/storybookjs/storybook/releases/tag/v9.1.19release-notes, web
https://access.redhat.com/security/cve/CVE-2026-27148vdb-entry
https://bugzilla.redhat.com/show_bug.cgi?id=2442784issue-tracking
https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-27148.json

Sources

SourceRecordLicence
CVE ListCVE-2026-27148 changed 2026-07-15CVE Terms of Use
GitHub Advisory DatabaseGHSA-mjf5-7g4m-gx5w changed 2026-02-26CC-BY-4.0
NVDCVE-2026-27148 changed 2026-07-15Public domain