Common Weakness Enumeration

CWE-526

Weakness Allowed

Cleartext 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
ChildOf: CWE-312 · View CWE-1000
PeerOf: CWE-214 (symmetric) · View CWE-1000
Modes of introduction
Architecture and Design
Implementation
Operation
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
Submission: CWE Community · 2006-07-19 · CWE Draft 3

Submitted by members of the CWE community to extend early CWE versions

Contribution: Drew Buttner · MITRE · 2023-01-11 · CWE 4.10

Suggested improvements to name, description, relationships, and mitigations

Modification: Eric Dalci · Cigital · 2008-07-01 · CWE 1.0

updated Potential_Mitigations, Time_of_Introduction

Modification: CWE Content Team · MITRE · 2008-09-08 · CWE 1.0

updated Relationships

Modification: CWE Content Team · MITRE · 2009-03-10 · CWE 1.3

updated Relationships

Modification: CWE Content Team · MITRE · 2011-03-29 · CWE 1.12

updated Name

Modification: CWE Content Team · MITRE · 2011-06-01 · CWE 1.13

updated Common_Consequences, Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2012-05-11 · CWE 2.2

updated Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2012-10-30 · CWE 2.3

updated Potential_Mitigations

Modification: CWE Content Team · MITRE · 2014-07-30 · CWE 2.8

updated Relationships, Taxonomy_Mappings

Modification: CWE Content Team · MITRE · 2020-02-24 · CWE 4.0

updated Name, Relationships

Modification: CWE Content Team · MITRE · 2021-10-28 · CWE 4.6

updated Relationships

Modification: CWE Content Team · MITRE · 2023-01-31 · CWE 4.10

updated Description, Name, Observed_Examples, Potential_Mitigations, References, Relationships

Modification: CWE Content Team · MITRE · 2023-04-27 · CWE 4.11

updated Detection_Factors, Relationships

Modification: CWE Content Team · MITRE · 2023-06-29 · CWE 4.12

updated Mapping_Notes

Modification: CWE Content Team · MITRE · 2025-12-11 · CWE 4.19

updated Applicable_Platforms, Relationships, Weakness_Ordinalities

Modification: CWE Content Team · MITRE · 2026-10-28 · CWE 5.0

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:31
VLAI
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.

Show details on source website

{
  "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:37
VLAI
Summary
hermes-agent has a sandbox issue
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.

Show details on source website

{
  "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:31
VLAI
Details

IBM 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.

Show details on source website

{
  "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
Architecture and Design

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
Implementation

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.