# 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.

- **Severity:** High 8.9 (`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`)
- **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:** Yes
- **Published:** 25 Feb 2026
- **Updated:** 15 Jul 2026
- **Also known as:** CLSA-2026-1792221531, CLSA-2026-1792329950, CLSA-2026-1792372482, CLSA-2026-1792383181, CLSA-2026-1792438529, GHSA-mjf5-7g4m-gx5w, MINI-4h52-hvvq-f4pq, ROOT-APP-NPM-CVE-2026-27148

## 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.

Weakness: CWE-346 (Origin Validation Error), CWE-79 (Improper Neutralization of Input During Web Page Generation), CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component)

## Which versions are affected by CVE-2026-27148?

6 open source packages ship an affected version, including storybook. It affects 1 product.


| Package | Ecosystem | 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: 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.

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

- [CVE-2025-68429](https://insights.sbomify.com/CVE-2025-68429/): Storybook manager bundle may expose environment variables during build (high 7.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-27148 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2026-27148 in the wild and no public exploit code.

Affected packages and fixed versions:
- storybook (npm): affected from 10.0.0-beta.0; fixed in 10.2.10
- storybook (npm): affected from 10.0.0-beta.0; fixed in 10.2.10
- storybook (npm): affected from 8.1.0; fixed in 8.6.17
- storybook (npm): affected from 8.1.0; fixed in 8.6.17
- storybook (npm): affected from 8.7.0-alpha.0; fixed in 9.1.19
- storybook (npm): affected from 8.7.0-alpha.0; fixed in 9.1.19

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-27148/ (Markdown: https://insights.sbomify.com/CVE-2026-27148/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-27148
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-27148
- OSV: https://osv.dev/vulnerability/CVE-2026-27148

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-27148/
Summaries are generated and may contain mistakes; the official description above is the record.
