Storybook token exposure in development server WebSocket access
storybookjs storybook
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| storybook npm |
|
|
storybookjs storybook
| Product | Affected | Fixed in |
|---|---|---|
| storybook npm |
|
|
| @storybook/core npm |
|
|
| @storybook/core-server npm |
|
|
| @storybook/experimental-addon-test npm |
|
|
| @storybook/addon-vitest npm |
|
|
| @storybook/addon-mcp npm |
|
|
Storybook is a frontend workshop for building user interface components and pages in isolation. From 8.0.0 until 8.6.19, 9.1.21, 10.6.2, and 11.0.0-alpha.6, the Storybook development server can expose its WebSocket authentication token to clients able to load its HTML pages over a local network. A LAN attacker can obtain the token and invoke WebSocket-backed file-writing or testing functionality. Weak story-write validation can allow code to be placed in story files. If the Storybook Vitest addon is installed with an old version of Vitest, the payload can use a Vitest API to write additional files or execute commands. Depending on the payload and local tooling, the attack can lead to code execution with the developer's privileges. This issue is fixed in 8.6.19, 9.1.21, 10.6.2, and 11.0.0-alpha.6.
From the CVE record · GitHub_M
The Storybook development server can expose its WebSocket authentication token to clients able to load its HTML pages over a local network. A LAN attacker can use the token to invoke file-writing or testing functionality and place code in story files. If the Storybook Vitest addon is installed with an old Vitest version, a payload can write additional files or execute commands; depending on local tooling, this can lead to code execution with the developer's privileges.
Teams running affected npm versions of storybook, @storybook/core, @storybook/core-server, @storybook/experimental-addon-test, @storybook/addon-vitest, or @storybook/addon-mcp should check their dependencies.