CVE-2025-68429
Unknown Unknown - Not Provided
Environment Variable Exposure in Storybook Build Artifacts

Publication date: 2025-12-17

Last updated on: 2026-04-10

Assigner: GitHub, Inc.

Description
Storybook is a frontend workshop for building user interface components and pages in isolation. A vulnerability present starting in versions 7.0.0 and prior to versions 7.6.21, 8.6.15, 9.1.17, and 10.1.10 relates to Storybook’s handling of environment variables defined in a `.env` file, which could, in specific circumstances, lead to those variables being unexpectedly bundled into the artifacts created by the `storybook build` command. When a built Storybook is published to the web, the bundle’s source is viewable, thus potentially exposing those variables to anyone with access. For a project to potentially be vulnerable to this issue, it must build the Storybook (i.e. run `storybook build` directly or indirectly) in a directory that contains a `.env` file (including variants like `.env.local`) and publish the built Storybook to the web. Storybooks built without a `.env` file at build time are not affected, including common CI-based builds where secrets are provided via platform environment variables rather than `.env` files. Storybook runtime environments (i.e. `storybook dev`) are not affected. Deployed applications that share a repo with your Storybook are not affected. Users should upgrade their Storybookβ€”on both their local machines and CI environmentβ€”to version .6.21, 8.6.15, 9.1.17, or 10.1.10 as soon as possible. Maintainers additionally recommend that users audit for any sensitive secrets provided via `.env` files and rotate those keys. Some projects may have been relying on the undocumented behavior at the heart of this issue and will need to change how they reference environment variables after this update. If a project can no longer read necessary environmental variable values, either prefix the variables with `STORYBOOK_` or use the `env` property in Storybook’s configuration to manually specify values. In either case, do not include sensitive secrets as they will be included in the built bundle.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-12-17
Last Modified
2026-04-10
Generated
2026-05-07
AI Q&A
2025-12-18
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 4 associated CPEs
Vendor Product Version / Range
storybook storybook From 10.0.0 (inc) to 10.1.10 (exc)
storybook storybook From 7.0.0 (inc) to 7.6.21 (exc)
storybook storybook From 8.0.0 (inc) to 8.6.15 (exc)
storybook storybook From 9.0.0 (inc) to 9.1.17 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-200 The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
CWE-541 If an include file source is accessible, the file can contain usernames and passwords, as well as sensitive information pertaining to the application and system.
CWE-538 The product places sensitive information into files or directories that are accessible to actors who are allowed to have access to the files, but not to the sensitive information.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability in Storybook affects versions starting from 7.0.0 up to versions prior to 7.6.21, 8.6.15, 9.1.17, and 10.1.10. It involves the handling of environment variables defined in a `.env` file during the build process (`storybook build`). Under certain conditions, these environment variables can be unintentionally included in the built Storybook artifacts. When the built Storybook is published on the web, the source code bundle is viewable, potentially exposing these environment variables to anyone who accesses it. The vulnerability only affects builds done in directories containing `.env` files and does not affect runtime environments or deployed applications sharing the repo. Users are advised to upgrade to fixed versions and audit their `.env` files for sensitive data.


How can this vulnerability impact me? :

If you build and publish a Storybook project in a directory containing a `.env` file, sensitive environment variables such as secrets or keys may be unintentionally included in the publicly accessible build artifacts. This exposure can lead to unauthorized access to sensitive information, potentially compromising security, integrity, and availability of your systems or data. It may also require you to rotate any exposed keys or secrets to mitigate the risk.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

You can detect this vulnerability by checking if your Storybook build process runs in a directory containing a `.env` file (including variants like `.env.local`) and if the built Storybook is published to the web. To check for `.env` files, you can run commands like `find . -name ".env*"` in your project directory. Additionally, inspect the built Storybook artifacts for any exposed environment variables by searching for sensitive keys in the build output files.


What immediate steps should I take to mitigate this vulnerability?

Immediately upgrade your Storybook versions to 7.6.21, 8.6.15, 9.1.17, or 10.1.10 on both local machines and CI environments. Audit your `.env` files for any sensitive secrets and rotate those keys. Avoid including sensitive secrets in `.env` files used during the build. If your project can no longer read necessary environment variables after upgrading, prefix variables with `STORYBOOK_` or use the `env` property in Storybook's configuration to specify values, but do not include sensitive secrets there.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

This vulnerability could lead to the unintended exposure of environment variables, which may include sensitive secrets, when a Storybook build is published to the web. Such exposure of sensitive data could potentially result in non-compliance with data protection standards and regulations like GDPR or HIPAA, which require the protection of confidential information. Therefore, organizations using affected versions of Storybook should upgrade and audit their environment variables to prevent accidental data leaks that might violate these compliance requirements.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart