storybook
Affected
- introduced
8.1.0, fixed8.6.17(semver)
Fixed versions
8.6.17
Fix
- Fixed version
8.6.17npm install [email protected]
Advisory
Also known as: CVE-2026-27148
Storybook Dev Server is Vulnerable to WebSocket Hijacking
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:
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.
High Basis: The source's own band: HIGH
8.1.0, fixed 8.6.17 (semver)8.6.17
8.6.17npm install [email protected]8.7.0-alpha.0, fixed 9.1.19 (semver)9.1.19
9.1.19npm install [email protected]10.0.0-beta.0, fixed 10.2.10 (semver)10.2.10
10.2.10npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0