CWE-526: Cleartext Storage of Sensitive Information in an Environment Variable
The product uses an environment variable to store unencrypted sensitive information.
Last updated
The product uses an environment variable to store unencrypted sensitive information.
Last updated
CWE-526 (Cleartext Storage of Sensitive Information in an Environment Variable) is a variant-level software weakness catalogued by MITRE in the Common Weakness Enumeration (CWE). It describes a recurring type of mistake that can lead to exploitable security vulnerabilities.
26 recorded CVEs are caused by CWE-526 (Cleartext Storage of Sensitive Information in an Environment Variable). The highest-severity and most recent are shown first. 13 new CWE-526 CVEs have been recorded so far in 2026 (7 in 2025).
OpenHuman: Bearer token leak via process environment variable on macOS (same-UID local RCE primitive)
python-utcp: Full Process Environment Exposed to CLI Subprocess - Secrets Leakage via Command Injection
Quarkus: build env information disclosure via gradle plugin
OpenShell: OpenShell: Unauthorized sandbox access via plaintext SSH secret
IBM Storage Virtualize vSphere Remote Plug-in information disclosure
PraisonAIAgents Affected by Environment Variable Secret Exfiltration via os.path.expandvars() Bypassing shell=False in Shell Tool
Letta through 0.16.8 Credential Exposure via Tool Sandbox Environment Inheritance
Quarkus-core: leak of local configuration properties into quarkus applications
Renovate 42.68.1 before 42.96.3 and 43.0.0 before 43.4.4 Environment Variable Exposure
Cluster-image-registry-operator: exposes a secret via env variable in pod definition on azure
Cleartext Storage of Sensitive Information in an Environment Variable in Elastic Cloud on Kubernetes Leading to Information Disclosure
Showing 12 of 26 recorded CWE-526 CVEs. Get an alert for each new one, with AI-written analysis and fixes.
Monitor these CVEsWhat can happen when CWE-526 is exploited.
Read Application Data
Affects: Confidentiality
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.
Typically introduced during these phases of the software lifecycle.
Practical mitigations for CWE-526, grouped by where in the lifecycle they apply.
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.
If the environment variable is not necessary for the desired behavior, then remove it entirely, or clear it to an empty value.
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
Real CVEs that MITRE cites as examples of this weakness.
Common questions about CWE-526.
Weakness data is sourced from the MITRE CWE catalog (v4.21). CVE associations are aggregated and kept current by RadicalNotion.AI.
Get an alert when a new CWE-526 CVE affects your products, with AI-written analysis and remediation steps.