@storybook/addon-interactions is a valuable tool for developers seeking to automate, test, and debug user interactions within their Storybook stories. Version 7.0.17 introduces subtle yet impactful improvements over its predecessor, version 7.0.16. While the core functionality and dependencies remain largely consistent, indicated by the shared dependencies like polished, jest-mock, ts-dedent, and various @storybook packages at corresponding major versions, the distinguishing factor lies within the internal updates and bug fixes that often accompany minor version bumps. Developers leveraging Storybook and this addon specifically benefit from its ability to visually represent and rigorously test complex user flows, ensuring a polished and predictable user experience.
The consistent dependency versions across both releases suggest a focus on internal stabilization and refinement rather than groundbreaking feature additions. This focus translates to a more reliable and performant addon experience. While the listed devDependencies such as formik, typescript, @types/node, @storybook/jest, @storybook/testing-library and @devtools-ds/object-inspector are primarily for the addon's development, the presence of @storybook/jest and @storybook/testing-library points to the addon's robust testing capabilities allowing developers to seamlessly integrate interaction tests into their workflow. The identical peer dependencies on React and React DOM versions across both builds further emphasize commitment of Storybook to ensure support for modern versions of React. Given the very proximate release dates, the update likely addresses immediate stability or minor feature enhancements discovered shortly after the initial 7.0.16 release, making version 7.0.17 the preferred choice for new installations and upgrades.
All the vulnerabilities related to the version 7.0.17 of the package
esbuild enables any website to send any requests to the development server and read the response
esbuild allows any websites to send any request to the development server and read the response due to default CORS settings.
esbuild sets Access-Control-Allow-Origin: *
header to all requests, including the SSE connection, which allows any websites to send any request to the development server and read the response.
https://github.com/evanw/esbuild/blob/df815ac27b84f8b34374c9182a93c94718f8a630/pkg/api/serve_other.go#L121 https://github.com/evanw/esbuild/blob/df815ac27b84f8b34374c9182a93c94718f8a630/pkg/api/serve_other.go#L363
Attack scenario:
http://malicious.example.com
).fetch('http://127.0.0.1:8000/main.js')
request by JS in that malicious web page. This request is normally blocked by same-origin policy, but that's not the case for the reasons above.http://127.0.0.1:8000/main.js
.In this scenario, I assumed that the attacker knows the URL of the bundle output file name. But the attacker can also get that information by
/index.html
: normally you have a script tag here/assets
: it's common to have a assets
directory when you have JS files and CSS files in a different directory and the directory listing feature tells the attacker the list of files/esbuild
SSE endpoint: the SSE endpoint sends the URL path of the changed files when the file is changed (new EventSource('/esbuild').addEventListener('change', e => console.log(e.type, e.data))
)The scenario above fetches the compiled content, but if the victim has the source map option enabled, the attacker can also get the non-compiled content by fetching the source map file.
npm i
npm run watch
fetch('http://127.0.0.1:8000/app.js').then(r => r.text()).then(content => console.log(content))
in a different website's dev tools.Users using the serve feature may get the source code stolen by malicious websites.