CWE-541
Weakness AllowedInclusion of Sensitive Information in an Include File
Abstraction: Variant · Status: Incomplete
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.
Mapping guidance
This CWE entry is at the Variant level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
Modes of introduction
Detection methods
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Content history
updated Potential_Mitigations, Time_of_Introduction
updated Relationships, Taxonomy_Mappings
updated Relationships
updated Relationships
updated Name
updated Common_Consequences
updated Relationships
updated Demonstrative_Examples, Potential_Mitigations
updated Relationships
updated Taxonomy_Mappings
updated Name, Relationships
updated Demonstrative_Examples
updated Relationships
updated Relationships
updated Mapping_Notes
updated Applicable_Platforms, Weakness_Ordinalities
updated Detection_Factors
2 vulnerabilities reference this CWE, most recent first.
CVE-2025-68429 (GCVE-0-2025-68429)
Vulnerability from cvelistv5 – Published: 2025-12-17 22:26 – Updated: 2025-12-18 15:06| URL | Tags |
|---|---|
| https://github.com/storybookjs/storybook/security… | x_refsource_CONFIRM |
| https://storybook.js.org/blog/security-advisory | x_refsource_MISC |
| Vendor | Product | Version | |
|---|---|---|---|
| storybookjs | storybook |
Affected:
>= 7.0.0, < 7.6.21
Affected: >= 8.0.0, < 8.6.15 Affected: >= 9.0.0, < 9.1.17 Affected: >= 10.0.0, < 10.1.10 |
{
"containers": {
"adp": [
{
"metrics": [
{
"other": {
"content": {
"id": "CVE-2025-68429",
"options": [
{
"Exploitation": "none"
},
{
"Automatable": "yes"
},
{
"Technical Impact": "partial"
}
],
"role": "CISA Coordinator",
"timestamp": "2025-12-18T14:52:42.162915Z",
"version": "2.0.3"
},
"type": "ssvc"
}
}
],
"providerMetadata": {
"dateUpdated": "2025-12-18T15:06:29.568Z",
"orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"shortName": "CISA-ADP"
},
"title": "CISA ADP Vulnrichment"
}
],
"cna": {
"affected": [
{
"product": "storybook",
"vendor": "storybookjs",
"versions": [
{
"status": "affected",
"version": "\u003e= 7.0.0, \u003c 7.6.21"
},
{
"status": "affected",
"version": "\u003e= 8.0.0, \u003c 8.6.15"
},
{
"status": "affected",
"version": "\u003e= 9.0.0, \u003c 9.1.17"
},
{
"status": "affected",
"version": "\u003e= 10.0.0, \u003c 10.1.10"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "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\u2019s 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\u2019s 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\u2014on both their local machines and CI environment\u2014to 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\u2019s configuration to manually specify values. In either case, do not include sensitive secrets as they will be included in the built bundle."
}
],
"metrics": [
{
"cvssV3_1": {
"attackComplexity": "LOW",
"attackVector": "NETWORK",
"availabilityImpact": "LOW",
"baseScore": 7.3,
"baseSeverity": "HIGH",
"confidentialityImpact": "LOW",
"integrityImpact": "LOW",
"privilegesRequired": "NONE",
"scope": "UNCHANGED",
"userInteraction": "NONE",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L",
"version": "3.1"
}
}
],
"problemTypes": [
{
"descriptions": [
{
"cweId": "CWE-200",
"description": "CWE-200: Exposure of Sensitive Information to an Unauthorized Actor",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-538",
"description": "CWE-538: Insertion of Sensitive Information into Externally-Accessible File or Directory",
"lang": "en",
"type": "CWE"
}
]
},
{
"descriptions": [
{
"cweId": "CWE-541",
"description": "CWE-541: Inclusion of Sensitive Information in an Include File",
"lang": "en",
"type": "CWE"
}
]
}
],
"providerMetadata": {
"dateUpdated": "2025-12-17T22:26:55.732Z",
"orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"shortName": "GitHub_M"
},
"references": [
{
"name": "https://github.com/storybookjs/storybook/security/advisories/GHSA-8452-54wp-rmv6",
"tags": [
"x_refsource_CONFIRM"
],
"url": "https://github.com/storybookjs/storybook/security/advisories/GHSA-8452-54wp-rmv6"
},
{
"name": "https://storybook.js.org/blog/security-advisory",
"tags": [
"x_refsource_MISC"
],
"url": "https://storybook.js.org/blog/security-advisory"
}
],
"source": {
"advisory": "GHSA-8452-54wp-rmv6",
"discovery": "UNKNOWN"
},
"title": "Storybook manager bundle may expose environment variables during build"
}
},
"cveMetadata": {
"assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
"assignerShortName": "GitHub_M",
"cveId": "CVE-2025-68429",
"datePublished": "2025-12-17T22:26:55.732Z",
"dateReserved": "2025-12-17T15:29:39.379Z",
"dateUpdated": "2025-12-18T15:06:29.568Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2"
}
GHSA-8452-54WP-RMV6
Vulnerability from github – Published: 2025-12-18 18:49 – Updated: 2025-12-18 18:49On December 11th, the Storybook team received a responsible disclosure alerting them to a potential vulnerability in certain built and published Storybooks.
The vulnerability is a bug in how Storybook handles 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. If those variables contained secrets, they should be considered compromised.
Who is impacted?
For a project to be vulnerable to this issue, it must:
- Build the Storybook (i.e. run
storybook builddirectly or indirectly) in a directory that contains a.envfile (including variants like.env.local) - The
.envfile contains sensitive secrets - Use Storybook version
7.0.0or above - 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.
Users' Storybook runtime environments (i.e. storybook dev) are not affected. Deployed applications that share a repo with a project's Storybook are not affected.
Storybook 6 and below are not affected.
Recommended actions
First, Storybook recommends that everyone audit for any sensitive secrets provided via .env files and rotate those keys.
Second, Storybook has released patched versions of all affected major Storybook versions that no longer have this vulnerability. Projects should upgrade their Storybook—on both local machines and CI environments—to one of these versions before publishing again.
10.1.10+9.1.17+8.6.15+7.6.21+
Finally, 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, it can 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.
Further information
Details of the vulnerability can be found on the Storybook announcement.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "storybook"
},
"ranges": [
{
"events": [
{
"introduced": "7.0.0"
},
{
"fixed": "7.6.21"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "storybook"
},
"ranges": [
{
"events": [
{
"introduced": "8.0.0"
},
{
"fixed": "8.6.15"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "storybook"
},
"ranges": [
{
"events": [
{
"introduced": "9.0.0"
},
{
"fixed": "9.1.17"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "storybook"
},
"ranges": [
{
"events": [
{
"introduced": "10.0.0"
},
{
"fixed": "10.1.10"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-68429"
],
"database_specific": {
"cwe_ids": [
"CWE-200",
"CWE-538",
"CWE-541"
],
"github_reviewed": true,
"github_reviewed_at": "2025-12-18T18:49:21Z",
"nvd_published_at": "2025-12-17T23:16:05Z",
"severity": "HIGH"
},
"details": "On December 11th, the Storybook team received a responsible disclosure alerting them to a potential vulnerability in certain built and published Storybooks. \n\nThe vulnerability is a bug in how Storybook handles 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\u2019s source is viewable, thus potentially exposing those variables to anyone with access. If those variables contained secrets, they should be considered compromised.\n\n## Who is impacted?\n\nFor a project to be vulnerable to this issue, it must:\n\n- Build the Storybook (i.e. run `storybook build` directly or indirectly) in a directory that contains a `.env` file (including variants like `.env.local`)\n- The `.env` file contains sensitive secrets\n- Use Storybook version `7.0.0` or above\n- Publish the built Storybook to the web\n\nStorybooks 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.\n\nUsers\u0027 Storybook runtime environments (i.e. `storybook dev`) are not affected. Deployed applications that share a repo with a project\u0027s Storybook are not affected.\n\nStorybook 6 and below are not affected.\n\n## Recommended actions\n\nFirst, Storybook recommends that everyone audit for any sensitive secrets provided via `.env` files and rotate those keys.\n\nSecond, Storybook has released patched versions of all affected major Storybook versions that no longer have this vulnerability. Projects should upgrade their Storybook\u2014on both local machines and CI environments\u2014to one of these versions **before publishing again**.\n\n- `10.1.10+`\n- `9.1.17+`\n- `8.6.15+`\n- `7.6.21+`\n\nFinally, 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, it can either prefix the variables with `STORYBOOK_` or use the [`env` property in Storybook\u2019s configuration](https://storybook.js.org/docs/configure/environment-variables#using-storybook-configuration) to manually specify values. In either case, **do not** include sensitive secrets as they *will* be included in the built bundle.\n\n## Further information\n\nDetails of the vulnerability can be found on the [Storybook announcement](https://storybook.js.org/blog/security-advisory).",
"id": "GHSA-8452-54wp-rmv6",
"modified": "2025-12-18T18:49:21Z",
"published": "2025-12-18T18:49:21Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/storybookjs/storybook/security/advisories/GHSA-8452-54wp-rmv6"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-68429"
},
{
"type": "PACKAGE",
"url": "https://github.com/storybookjs/storybook"
},
{
"type": "WEB",
"url": "https://storybook.js.org/blog/security-advisory"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
}
],
"summary": "Storybook manager bundle may expose environment variables during build"
}
Mitigation
Do not store sensitive information in include files.
Mitigation
Protect include files from being exposed.
No CAPEC attack patterns related to this CWE.