{"id":"CVE-2026-27148","aliases":["CVE-2026-27148","GHSA-mjf5-7g4m-gx5w"],"related":[],"kind":"vulnerability","state":"published","title":"Storybook Dev Server Vulnerable to WebSocket Hijacking","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe 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**.\n\n### Details\n\nExploitation 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.\n\nIf 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.\n\nThe 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).\n\n_Note: recent versions of Chrome have some protections against this, but Firefox does not._\n\n### Impact\nThis vulnerability can lead to supply chain compromise. Key risks include:\n\n- **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.\n- **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.\n- **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.\n\n### Affected versions\n\n8.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.\n\n### Recommended actions\nUpdate to one of the patched versions: `7.6.23`, `8.6.17`, `9.1.19`, `10.2.10`.","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2026-02-25T21:46:48.967Z","modified":"2026-07-15T02:19:06.850Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":8.9,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","score":8.9,"rating":"HIGH"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:H","score":8.8,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H","score":9.6,"rating":"CRITICAL"}],"cwes":["CWE-74","CWE-79","CWE-346","CWE-1385"],"affected":[{"ranges":[{"version":"< 7.6.23","status":"affected"},{"version":">= 8.1.0, < 8.6.17","status":"affected"},{"version":">= 9.0.0, < 9.1.19","status":"affected"},{"version":">= 10.0.0, < 10.2.10","status":"affected"}],"vendor":"storybookjs","product":"storybook","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"grafana","cpe":"cpe:/o:redhat:enterprise_linux:10","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"grafana","cpe":"cpe:/o:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"streams for Apache Kafka 2","package":"com.github.streamshub-console","cpe":"cpe:/a:redhat:amq_streams:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"streams for Apache Kafka 3","package":"com.github.streamshub-console","cpe":"cpe:/a:redhat:amq_streams:3","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"8.1.0","status":"affected","fixed":"8.6.17"}],"ecosystem":"npm","package":"storybook","purl":"pkg:npm/storybook","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"8.7.0-alpha.0","status":"affected","fixed":"9.1.19"}],"ecosystem":"npm","package":"storybook","purl":"pkg:npm/storybook","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"10.0.0-beta.0","status":"affected","fixed":"10.2.10"}],"ecosystem":"npm","package":"storybook","purl":"pkg:npm/storybook","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"7.6.23"},{"status":"affected","introduced":"8.1.0","fixed":"8.6.17"},{"status":"affected","introduced":"9.0.0","fixed":"9.1.19"},{"status":"affected","introduced":"10.0.0","fixed":"10.2.10"}],"vendor":"storybook","product":"storybook","cpe":"cpe:2.3:a:storybook:storybook:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/storybookjs/storybook/security/advisories/GHSA-mjf5-7g4m-gx5w","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/storybookjs/storybook/commit/0affdf928bd6fafbadfb1dfe22ce6104805e10e8","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/storybookjs/storybook/commit/54689a8add18ea75d628c540f4bc677592a1e685","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/storybookjs/storybook/commit/b8cfa77c73940c140acdcd8a06ab1ea913c44761","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/storybookjs/storybook/commit/d34085f39c647f5c23c3a3b2d197c18602fcf876","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/storybookjs/storybook/releases/tag/v10.2.10","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/storybookjs/storybook/releases/tag/v7.6.23","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/storybookjs/storybook/releases/tag/v8.6.17","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/storybookjs/storybook/releases/tag/v9.1.19","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-27148","tags":["vdb-entry","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2442784","tags":["issue-tracking","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-27148.json","tags":["x-sadp-csaf-vex"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27148","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/storybookjs/storybook","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-02-26T20:25:54.835Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-27148","url":"https://www.cve.org/CVERecord?id=CVE-2026-27148","licence":"CVE Terms of Use","modified":"2026-07-15T01:14:24.350Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-mjf5-7g4m-gx5w","url":"https://github.com/advisories/GHSA-mjf5-7g4m-gx5w","licence":"CC-BY-4.0","modified":"2026-02-26T15:32:56.650Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-27148","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27148","licence":"Public domain","modified":"2026-07-15T02:19:06.850Z"}],"updatedAt":"2026-11-25T22:59:14.903Z","epss":{"score":0.00622,"percentile":0.51195,"date":"2026-12-01T12:00:22.000Z"}}