REDHAT-BUG-2442784: XSS
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Storybook dev serverto a version that resolves this vulnerability.Fixed in 7.6.23 - Upgrade
Upgrade
Storybook dev serverto a version that resolves this vulnerability.Fixed in 8.6.17 - Upgrade
Upgrade
Storybook dev serverto a version that resolves this vulnerability.Fixed in 9.1.19 - Upgrade
Upgrade
Storybook dev serverto a version that resolves this vulnerability.Fixed in 10.2.10 - Compensating control
Do not intentionally expose the local Storybook dev server publicly (e.g., for design reviews/stakeholder demos), since higher risk applies when the dev server is reachable beyond the local host.
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2442784?
The severity of REDHAT-BUG-2442784 is rated high with a score of 7.
How do I fix REDHAT-BUG-2442784?
To fix REDHAT-BUG-2442784, upgrade Storybook to versions 7.6.23, 8.6.17, 9.1.19, or 10.2.10.
What impact does REDHAT-BUG-2442784 have on users?
REDHAT-BUG-2442784 allows for WebSocket hijacking, which can potentially compromise user data and application integrity.
Which versions of Storybook are affected by REDHAT-BUG-2442784?
Versions prior to 7.6.23, 8.6.17, 9.1.19, and 10.2.10 of Storybook are affected by REDHAT-BUG-2442784.
What is the nature of the vulnerability in REDHAT-BUG-2442784?
The vulnerability in REDHAT-BUG-2442784 involves WebSocket functionality that can be exploited for cross-site scripting (XSS) attacks.