CWE-526
Weakness AllowedCleartext Storage of Sensitive Information in an Environment Variable
Abstraction: Variant · Status: Incomplete
The product uses an environment variable to store unencrypted sensitive information.
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.
Relationships and members
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.)
Effectiveness: High
Content history
Submitted by members of the CWE community to extend early CWE versions
Suggested improvements to name, description, relationships, and mitigations
updated Potential_Mitigations, Time_of_Introduction
updated Relationships
updated Relationships
updated Name
updated Common_Consequences, Relationships, Taxonomy_Mappings
updated Relationships, Taxonomy_Mappings
updated Potential_Mitigations
updated Relationships, Taxonomy_Mappings
updated Name, Relationships
updated Relationships
updated Description, Name, Observed_Examples, Potential_Mitigations, References, Relationships
updated Detection_Factors, Relationships
updated Mapping_Notes
updated Applicable_Platforms, Relationships, Weakness_Ordinalities
updated Common_Consequences, Description
53 vulnerabilities reference this CWE, most recent first.
GHSA-WM8J-HGW9-H534
Vulnerability from github – Published: 2026-02-17 21:31 – Updated: 2026-02-17 21:31IBM DB2 Recovery Expert for LUW 5.5 Interim Fix 002 discloses sensitive information in an environment variable that could aid in further attacks against the system.
{
"affected": [],
"aliases": [
"CVE-2025-27899"
],
"database_specific": {
"cwe_ids": [
"CWE-526"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-02-17T20:22:02Z",
"severity": "MODERATE"
},
"details": "IBM DB2 Recovery Expert for LUW 5.5 Interim Fix 002 discloses sensitive information in an environment variable that could aid in further attacks against the system.",
"id": "GHSA-wm8j-hgw9-h534",
"modified": "2026-02-17T21:31:14Z",
"published": "2026-02-17T21:31:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-27899"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/pages/node/7259901"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-WM96-9GFH-VVGQ
Vulnerability from github – Published: 2026-05-26 13:30 – Updated: 2026-06-30 15:37A vulnerability was identified in NousResearch hermes-agent up to 2026.4.16. This impacts the function execute_code of the file tools/code_execution_tool.py of the component Environment Variable Handler. Such manipulation leads to sandbox issue. It is possible to launch the attack remotely. The exploit is publicly available and might be used. The vendor was contacted early about this disclosure but did not respond in any way.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "hermes-agent"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.11.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-9368"
],
"database_specific": {
"cwe_ids": [
"CWE-269",
"CWE-526"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-30T15:37:24Z",
"nvd_published_at": "2026-05-24T09:16:32Z",
"severity": "MODERATE"
},
"details": "A vulnerability was identified in NousResearch hermes-agent up to 2026.4.16. This impacts the function execute_code of the file tools/code_execution_tool.py of the component Environment Variable Handler. Such manipulation leads to sandbox issue. It is possible to launch the attack remotely. The exploit is publicly available and might be used. The vendor was contacted early about this disclosure but did not respond in any way.",
"id": "GHSA-wm96-9gfh-vvgq",
"modified": "2026-06-30T15:37:24Z",
"published": "2026-05-26T13:30:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-9368"
},
{
"type": "WEB",
"url": "https://github.com/NousResearch/hermes-agent/commit/285bb2b9150b93445e5eded9bc897a4001b66e55"
},
{
"type": "WEB",
"url": "https://gist.github.com/YLChen-007/43c72d19668421abe8ce10f299323a0a"
},
{
"type": "PACKAGE",
"url": "https://github.com/NousResearch/hermes-agent"
},
{
"type": "WEB",
"url": "https://vuldb.com/submit/812229"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/365331"
},
{
"type": "WEB",
"url": "https://vuldb.com/vuln/365331/cti"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P",
"type": "CVSS_V4"
}
],
"summary": "hermes-agent has a sandbox issue"
}
GHSA-XR9W-R8GW-WJHW
Vulnerability from github – Published: 2025-12-09 00:31 – Updated: 2025-12-09 00:31IBM Controller 11.1.0 through 11.1.1 and IBM Cognos Controller 11.0.0 through 11.0.1 FP6 stores unencrypted sensitive information in environmental variables files which can be obtained by an authenticated user.
{
"affected": [],
"aliases": [
"CVE-2025-36017"
],
"database_specific": {
"cwe_ids": [
"CWE-526"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-08T22:15:51Z",
"severity": "MODERATE"
},
"details": "IBM Controller 11.1.0 through 11.1.1 and IBM Cognos Controller 11.0.0 through 11.0.1 FP6\u00a0stores unencrypted sensitive information in environmental variables files which can be obtained by an authenticated user.",
"id": "GHSA-xr9w-r8gw-wjhw",
"modified": "2025-12-09T00:31:16Z",
"published": "2025-12-09T00:31:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-36017"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/pages/node/7253283"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
Mitigation
Encrypt information stored in the environment variable to protect it from being exposed to an unauthorized user. If encryption is not feasible or is considered too expensive for the business use of the application, then consider using a properly protected configuration file instead of an environment variable. It should be understood that unencrypted information in a config file is also not guaranteed to be protected, but it is still a better choice, because it reduces attack surface related to weaknesses such as CWE-214. In some settings, vaults might be a feasible option for safer data transfer. Users should be notified of the business choice made to not protect the sensitive information through encryption.
Mitigation
If the environment variable is not necessary for the desired behavior, then remove it entirely, or clear it to an empty value.
No CAPEC attack patterns related to this CWE.