CVE-2026-27148 Storybook Dev Server Vulnerable to WebSocket Hijacking
Attackers can hijack WebSocket connections to inject malicious code, leading to persistent XSS or remote code execution on the local Storybook dev server.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2026-27148?
CVE-2026-27148 is a high-severity cross-site scripting vulnerability in storybookjs storybook, published on 25 Feb 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official 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.
Which versions are affected by CVE-2026-27148?
6 open source packages ship an affected version, including storybook. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
storybook npm | From 10.0.0-beta.0 | 10.2.10 |
storybook npm | From 10.0.0-beta.0 | 10.2.10 |
storybook npm | From 8.1.0 | 8.6.17 |
storybook npm | From 8.1.0 | 8.6.17 |
storybook npm | From 8.7.0-alpha.0 | 9.1.19 |
storybook npm | From 8.7.0-alpha.0 | 9.1.19 |
Products include Storybook Storybook.
How do I fix CVE-2026-27148?
Upgrade storybook to a fixed version for your release line: 10.2.10, 8.6.17 or 9.1.19.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-27148 being exploited?
There is no known exploitation of CVE-2026-27148 in the wild and no public exploit code.
Other vulnerabilities in storybookjs storybook
Sources
Also known as CLSA-2026-1792221531, CLSA-2026-1792329950, CLSA-2026-1792372482, CLSA-2026-1792383181, CLSA-2026-1792438529, GHSA-mjf5-7g4m-gx5w and 2 more.