CVE-2026-27148: Storybook Dev Server Vulnerable to WebSocket Hijacking

Published Feb 25, 2026
·
Updated

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.

Other sources

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.

— NVD

Affected Software

8 affected componentsFixes available
npm/storybook<7.6.23, <8.6.17, <9.1.19, <10.2.10
npm/storybook>=10.0.0-beta.0<10.2.10
10.2.10
npm/storybook>=8.7.0-alpha.0<9.1.19
9.1.19
npm/storybook>=8.1.0<8.6.17
8.6.17
Storybook Storybook Node.js<7.6.23
Storybook Storybook Node.js>=8.1.0<8.6.17
Storybook Storybook Node.js>=9.0.0<9.1.19
Storybook Storybook Node.js>=10.0.0<10.2.10

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/storybook to a version that resolves this vulnerability.

    Fixed in 10.2.10
  2. Upgrade

    Upgrade npm/storybook to a version that resolves this vulnerability.

    Fixed in 9.1.19
  3. Upgrade

    Upgrade npm/storybook to a version that resolves this vulnerability.

    Fixed in 8.6.17
  4. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 7.6.23
  5. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 8.6.17
  6. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 9.1.19
  7. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 10.2.10

Event History

Feb 25, 2026
CVE Published
via MITRE·09:46 PM
Data Sourced
via MITRE·09:46 PM
DescriptionWeakness
Data Sourced
via Red Hat·10:02 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·10:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:16 PM
RemedyAffected Software
Feb 26, 2026
Advisory Published
via GitHub·03:16 PM
Data Sourced
via GitHub·03:16 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-27148?

CVE-2026-27148 has been classified as a medium-severity vulnerability due to the potential for WebSocket hijacking.

2

How do I fix CVE-2026-27148?

To mitigate CVE-2026-27148, upgrade Storybook to version 7.6.23, 8.6.17, 9.1.19, or 10.2.10 or later.

3

Which versions of Storybook are affected by CVE-2026-27148?

CVE-2026-27148 affects Storybook versions prior to 7.6.23, 8.6.17, 9.1.19, and 10.2.10.

4

What type of vulnerability is CVE-2026-27148?

CVE-2026-27148 is a WebSocket hijacking vulnerability present in the Storybook development server.

5

Can CVE-2026-27148 impact production environments?

Yes, if the affected versions are used in production, CVE-2026-27148 can pose a security risk.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203