CWEweakness
CWE-526 Cleartext Storage of Sensitive Information in an Environment Variable
- Abstraction
- Variant
- Structure
- Simple
- Status
- Incomplete
- Languages
- Not Language-Specific
- CWE version
- 5.0
Description
The product uses an environment variable to store unencrypted sensitive information.
Common consequences
• Confidentiality: Read Application Data — Information stored in an environment variable might be accessible by other processes with the execution context, including child processes that dependencies are executed in, or serverless functions in cloud environments. An environment variable's contents can also be inserted into messages, headers, log files, or other outputs. Often these other dependencies have no need to use the environment variable in question. A weakness that discloses environment variables could expose this information.
Potential mitigations
• [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.
• [Implementation] If the environment variable is not necessary for the desired behavior, then remove it entirely, or clear it to an empty value.
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.)
Observed examples
• CVE-2022-43691: CMS shows sensitive server-side information from environment variables when run in Debug mode.
• CVE-2022-27195: Plugin for an automation server inserts environment variable contents into build XML files.
• CVE-2022-25264: CI/CD tool logs environment variables related to passwords add Contribution to content history.
Related
Observed example · CVE (3)
- CVE-2022-43691 Concrete CMS (formerly concrete5) below 8.5.10 and between 9.0.0 and 9.1.2 inadvertently disclose server-side sensitive information… vulnerability
- CVE-2022-27195 Jenkins Parameterized Trigger Plugin 2.43 and earlier captures environment variables passed to builds triggered using Jenkins Parameterized… vulnerability
- CVE-2022-25264 In JetBrains TeamCity before 2021.2.3, environment variables of the "password" type could be logged in some cases. vulnerability
Child of · CWE (1)
- CWE-312 Cleartext Storage of Sensitive Information weakness
Peer of · CWE (1)
- CWE-214 Invocation of Process Using Visible Sensitive Information weakness
Referenced by CVE · weakness (22)
- CVE-2026-77938 Letta through 0.16.8 contains an information disclosure vulnerability that allows users running tools to read server secrets because… vulnerability
- CVE-2026-108592 mini-swe-agent 1.10.0 through 2.4.6 contains an information exposure vulnerability in BubblewrapEnvironment because bwrap omits --clearenv,… vulnerability
- CVE-2026-76227 Renovate versions from 42.68.1 before 42.96.3 and from 43.0.0 before 43.4.4, including the renovate/renovate Docker images, and Mend… vulnerability
- CVE-2026-72648 Cleartext Storage of Sensitive Information in an Environment Variable (CWE-526) in Elastic Cloud on Kubernetes (ECK) can lead to… vulnerability
- CVE-2026-49377 In JetBrains TeamCity before 2025.11.2 exposure of sensitive data via default agent parameters vulnerability
- CVE-2026-45370 python-utcp is the python implementation of UTCP. vulnerability
- CVE-2026-40153 PraisonAIAgents is a multi-agent teams system. vulnerability
- CVE-2025-36105 IBM Planning Analytics Advanced Certified Containers 3.1.0 through 3.1.4 could allow a local privileged user to obtain sensitive… vulnerability
- CVE-2025-27899 IBM DB2 Recovery Expert for LUW 5.5 Interim Fix 002 discloses sensitive information in an environment variable that could aid in further… vulnerability
- CVE-2025-36017 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… vulnerability
- CVE-2025-9162 A flaw was found in org.keycloak/keycloak-model-storage-service. vulnerability
- CVE-2025-28381 A credential leak in OpenC3 COSMOS before v6.0.2 allows attackers to access service credentials as environment variables stored in all… vulnerability
- CVE-2023-43029 IBM Storage Virtualize vSphere Remote Plug-in 1.0 and 1.1 could allow a remote user to obtain sensitive credential information after… vulnerability
- CVE-2024-12604 Cleartext Storage of Sensitive Information in an Environment Variable, Weak Password Recovery Mechanism for Forgotten Password… vulnerability
- CVE-2025-0985 IBM MQ 9.3 LTS, 9.3 CD, 9.4 LTS, and 9.4 CD stores potentially sensitive information in environment variables that could be obtained by a… vulnerability
- CVE-2024-11736 A vulnerability was found in Keycloak. vulnerability
- CVE-2024-4369 An information disclosure flaw was found in OpenShift's internal image registry operator. vulnerability
- CVE-2024-2700 A vulnerability was found in the quarkus-core component. vulnerability
- CVE-2023-5720 A flaw was found in Quarkus, where it does not properly sanitize artifacts created using the Gradle plugin, allowing certain build system… vulnerability
- CVE-2023-47615 A CWE-526: Exposure of Sensitive Information Through Environmental Variables vulnerability exists in Telit Cinterion BGS5, Telit Cinterion… vulnerability
- CVE-2023-35931 Shescape is a simple shell escape library for JavaScript. vulnerability
- CVE-2014-2377 Ecava IntegraXor SCADA Server Stable 4.1.4360 and earlier and Beta 4.1.4392 and earlier allows remote attackers to discover full pathnames… vulnerability