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-6RG8-WQVX-GHG5
Vulnerability from github – Published: 2025-03-10 15:30 – Updated: 2026-06-01 15:30Cleartext Storage of Sensitive Information in an Environment Variable, Weak Password Recovery Mechanism for Forgotten Password vulnerability in Tapandsign Technologies Tap&Sign App allows Password Recovery Exploitation, Functionality Misuse.This issue affects Tap&Sign App: before V.1.025.
{
"affected": [],
"aliases": [
"CVE-2024-12604"
],
"database_specific": {
"cwe_ids": [
"CWE-312",
"CWE-526"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-03-10T15:15:36Z",
"severity": "HIGH"
},
"details": "Cleartext Storage of Sensitive Information in an Environment Variable, Weak Password Recovery Mechanism for Forgotten Password vulnerability in Tapandsign Technologies Tap\u0026Sign App allows Password Recovery Exploitation, Functionality Misuse.This issue affects Tap\u0026Sign App: before V.1.025.",
"id": "GHSA-6rg8-wqvx-ghg5",
"modified": "2026-06-01T15:30:32Z",
"published": "2025-03-10T15:30:48Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-12604"
},
{
"type": "WEB",
"url": "https://docs.tapandsign.com/tap-and-sign/tap-and-sign-v.1.025-surum-notlari"
},
{
"type": "WEB",
"url": "https://siberguvenlik.gov.tr/guvenlik-bildirimleri/detay/tr-25-0063"
},
{
"type": "WEB",
"url": "https://www.usom.gov.tr/bildirim/tr-25-0063"
}
],
"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"
}
]
}
GHSA-8HXP-QMPH-W5GQ
Vulnerability from github – Published: 2025-10-08 23:32 – Updated: 2025-10-10 14:03A flaw was found in org.keycloak/keycloak-model-storage-service. The KeycloakRealmImport custom resource substitutes placeholders within imported realm documents, potentially referencing environment variables. This substitution process allows for injection attacks when crafted realm documents are processed. An attacker can leverage this to inject malicious content during the realm import procedure. This can lead to unintended consequences within the Keycloak environment.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c 26.2.9"
},
"package": {
"ecosystem": "Maven",
"name": "org.keycloak:keycloak-model-storage-services"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.keycloak:keycloak-model-storage-services"
},
"ranges": [
{
"events": [
{
"introduced": "26.3.0"
},
{
"fixed": "26.3.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-9162"
],
"database_specific": {
"cwe_ids": [
"CWE-526"
],
"github_reviewed": true,
"github_reviewed_at": "2025-10-08T23:32:36Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "A flaw was found in org.keycloak/keycloak-model-storage-service. The `KeycloakRealmImport` custom resource substitutes placeholders within imported realm documents, potentially referencing environment variables. This substitution process allows for injection attacks when crafted realm documents are processed. An attacker can leverage this to inject malicious content during the realm import procedure. This can lead to unintended consequences within the Keycloak environment.",
"id": "GHSA-8hxp-qmph-w5gq",
"modified": "2025-10-10T14:03:37Z",
"published": "2025-10-08T23:32:36Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/keycloak/keycloak/security/advisories/GHSA-8hxp-qmph-w5gq"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2025:15336"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2025:15337"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2025:15338"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2025:15339"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2025:16399"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2025:16400"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2025-9162"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2389396"
},
{
"type": "PACKAGE",
"url": "https://github.com/keycloak/keycloak"
},
{
"type": "WEB",
"url": "https://github.com/keycloak/keycloak/blob/26.3.3/model/storage-services/src/main/java/org/keycloak/exportimport/AbstractFileBasedImportProvider.java#L36"
},
{
"type": "WEB",
"url": "https://github.com/keycloak/keycloak/blob/75afda410495a9576e00edc3277ab42ca155f806/model/storage-services/src/main/java/org/keycloak/exportimport/AbstractFileBasedImportProvider.java#L35"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Keycloak Potential Variable Reference in Model Storage Services"
}
GHSA-994R-4F38-CVGV
Vulnerability from github – Published: 2026-08-13 21:36 – Updated: 2026-08-13 21:36Cleartext Storage of Sensitive Information in an Environment Variable (CWE-526) in Elastic Cloud on Kubernetes (ECK) can lead to information disclosure via Retrieve Embedded Sensitive Data (CAPEC-37). When ECK reconciles a Fleet Server resource that authenticates to Elasticsearch with a service account token, the token is written into the generated workload specification in cleartext rather than being referenced from the Kubernetes Secret that ECK maintains for the other credentials on the same path. Any principal able to read workload specifications in the affected namespace can therefore read a live Elasticsearch credential, even when Kubernetes RBAC does not grant that principal access to Secrets.
{
"affected": [],
"aliases": [
"CVE-2026-72648"
],
"database_specific": {
"cwe_ids": [
"CWE-526"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-08-13T20:17:25Z",
"severity": "MODERATE"
},
"details": "Cleartext Storage of Sensitive Information in an Environment Variable (CWE-526) in Elastic Cloud on Kubernetes (ECK) can lead to information disclosure via Retrieve Embedded Sensitive Data (CAPEC-37). When ECK reconciles a Fleet Server resource that authenticates to Elasticsearch with a service account token, the token is written into the generated workload specification in cleartext rather than being referenced from the Kubernetes Secret that ECK maintains for the other credentials on the same path. Any principal able to read workload specifications in the affected namespace can therefore read a live Elasticsearch credential, even when Kubernetes RBAC does not grant that principal access to Secrets.",
"id": "GHSA-994r-4f38-cvgv",
"modified": "2026-08-13T21:36:08Z",
"published": "2026-08-13T21:36:08Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-72648"
},
{
"type": "WEB",
"url": "https://discuss.elastic.co/t/elastic-cloud-on-kubernetes-3-5-0-security-update-esa-2026-113/389493"
}
],
"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"
}
]
}
GHSA-CC73-99RJ-C7FH
Vulnerability from github – Published: 2024-05-01 00:31 – Updated: 2024-06-19 18:31An information disclosure flaw was found in OpenShift's internal image registry operator. AZURE_CLIENT_SECRET can be exposed through an environment variable defined in the pod definition, but is limited to Azure environments. An attacker controlling an account that has high enough permissions to obtain pod information from the openshift-image-registry namespace could use this obtained client secret to perform actions as the registry operator's Azure service account.
{
"affected": [],
"aliases": [
"CVE-2024-4369"
],
"database_specific": {
"cwe_ids": [
"CWE-526"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-05-01T00:15:06Z",
"severity": "MODERATE"
},
"details": "An information disclosure flaw was found in OpenShift\u0027s internal image registry operator. AZURE_CLIENT_SECRET can be exposed through an environment variable defined in the pod definition, but is limited to Azure environments. An attacker controlling an account that has high enough permissions to obtain pod information from the openshift-image-registry namespace could use this obtained client secret to perform actions as the registry operator\u0027s Azure service account.",
"id": "GHSA-cc73-99rj-c7fh",
"modified": "2024-06-19T18:31:07Z",
"published": "2024-05-01T00:31:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-4369"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:3881"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:3889"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2024-4369"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2278035"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-F4V7-3MWW-9GC2
Vulnerability from github – Published: 2025-01-13 16:58 – Updated: 2025-01-14 16:38A security vulnerability has been identified that allows admin users to access sensitive server environment variables and system properties through user-configurable URLs. Specifically, when configuring backchannel logout URLs or admin URLs, admin users can include placeholders like ${env.VARNAME} or ${PROPNAME}. The server replaces these placeholders with the actual values of environment variables or system properties during URL processing.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.keycloak:keycloak-quarkus-server"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "26.0.8"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-11736"
],
"database_specific": {
"cwe_ids": [
"CWE-526"
],
"github_reviewed": true,
"github_reviewed_at": "2025-01-13T16:58:08Z",
"nvd_published_at": "2025-01-14T09:15:20Z",
"severity": "MODERATE"
},
"details": "A security vulnerability has been identified that allows admin users to access sensitive server environment variables and system properties through user-configurable URLs. Specifically, when configuring backchannel logout URLs or admin URLs, admin users can include placeholders like ${env.VARNAME} or ${PROPNAME}. The server replaces these placeholders with the actual values of environment variables or system properties during URL processing.\n\n",
"id": "GHSA-f4v7-3mww-9gc2",
"modified": "2025-01-14T16:38:41Z",
"published": "2025-01-13T16:58:08Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/keycloak/keycloak/security/advisories/GHSA-f4v7-3mww-9gc2"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-11736"
},
{
"type": "WEB",
"url": "https://github.com/keycloak/keycloak/commit/7a76858fe4aa39a39fb6b86dd3d2c113d9c59854"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2025:0299"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2025:0300"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2024-11736"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2328850"
},
{
"type": "PACKAGE",
"url": "https://github.com/keycloak/keycloak"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Keycloak allows unrestricted admin use of system and environment variables"
}
GHSA-F8H5-V2VG-46RR
Vulnerability from github – Published: 2024-04-04 15:30 – Updated: 2024-12-13 00:30A vulnerability was found in the quarkus-core component. Quarkus captures the local environment variables from the Quarkus namespace during the application's build. Thus, running the resulting application inherits the values captured at build time.
However, some local environment variables may have been set by the developer / CI environment for testing purposes, such as dropping the database during the application startup or trusting all TLS certificates to accept self-signed certificates. If these properties are configured using environment variables or the .env facility, they are captured into the built application. It may lead to dangerous behavior if the application does not override these values.
This behavior only happens for configuration properties from the quarkus.* namespace. So, application-specific properties are not captured.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 3.9.1"
},
"package": {
"ecosystem": "Maven",
"name": "io.quarkus:quarkus-core"
},
"ranges": [
{
"events": [
{
"introduced": "3.9.0.CR1"
},
{
"fixed": "3.9.2"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 3.8.3"
},
"package": {
"ecosystem": "Maven",
"name": "io.quarkus:quarkus-core"
},
"ranges": [
{
"events": [
{
"introduced": "3.3.0.CR1"
},
{
"fixed": "3.8.4"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "io.quarkus:quarkus-core"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.2.12.Final"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-2700"
],
"database_specific": {
"cwe_ids": [
"CWE-526"
],
"github_reviewed": true,
"github_reviewed_at": "2024-04-04T17:01:45Z",
"nvd_published_at": "2024-04-04T14:15:09Z",
"severity": "HIGH"
},
"details": "A vulnerability was found in the quarkus-core component. Quarkus captures the local environment variables from the Quarkus namespace during the application\u0027s build. Thus, running the resulting application inherits the values captured at build time. \n\nHowever, some local environment variables may have been set by the developer / CI environment for testing purposes, such as dropping the database during the application startup or trusting all TLS certificates to accept self-signed certificates. If these properties are configured using environment variables or the .env facility, they are captured into the built application. It may lead to dangerous behavior if the application does not override these values.\n\nThis behavior only happens for configuration properties from the `quarkus.*` namespace. So, application-specific properties are not captured.",
"id": "GHSA-f8h5-v2vg-46rr",
"modified": "2024-12-13T00:30:50Z",
"published": "2024-04-04T15:30:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-2700"
},
{
"type": "WEB",
"url": "https://github.com/quarkusio/quarkus/issues/39927"
},
{
"type": "WEB",
"url": "https://github.com/quarkusio/quarkus/commit/2b24dc8dbc8f390c97428783d67614418676fc2e"
},
{
"type": "WEB",
"url": "https://github.com/quarkusio/quarkus/commit/91c3a58eaefe59e0afd430653d1636d664bd593f"
},
{
"type": "WEB",
"url": "https://github.com/quarkusio/quarkus/commit/990c3ee5dd5c689f514e5e87c221bce6d5dff267"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:11023"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:2106"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:2705"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:3527"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:4028"
},
{
"type": "WEB",
"url": "https://access.redhat.com/errata/RHSA-2024:4873"
},
{
"type": "WEB",
"url": "https://access.redhat.com/security/cve/CVE-2024-2700"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=2273281"
},
{
"type": "PACKAGE",
"url": "https://github.com/quarkusio/quarkus"
},
{
"type": "WEB",
"url": "https://quarkus.io/blog/quarkus-3-2-12-final-released"
},
{
"type": "WEB",
"url": "https://quarkus.io/blog/quarkus-3-8-4-released"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "quarkus-core leaks local environment variables from Quarkus namespace during application\u0027s build"
}
GHSA-GQWW-M5RR-M2RG
Vulnerability from github – Published: 2026-11-17 18:31 – Updated: 2026-11-17 18:31NVIDIA OpenShell for Linux contains a vulnerability in the Kubernetes sandbox SSH authentication configuration where a local attacker with low privileges could obtain sensitive authentication information by accessing an SSH handshake secret stored in a plaintext environment variable and reuse the shared secret to gain unauthorized access to other sandboxes. A successful exploit of this vulnerability might lead to information disclosure, data tampering, and denial of service.
{
"affected": [],
"aliases": [
"CVE-2026-100975"
],
"database_specific": {
"cwe_ids": [
"CWE-526"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-11-17T16:17:34Z",
"severity": "HIGH"
},
"details": "NVIDIA OpenShell for Linux contains a vulnerability in the Kubernetes sandbox SSH authentication configuration where a local attacker with low privileges could obtain sensitive authentication information by accessing an SSH handshake secret stored in a plaintext environment variable and reuse the shared secret to gain unauthorized access to other sandboxes. A successful exploit of this vulnerability might lead to information disclosure, data tampering, and denial of service.",
"id": "GHSA-gqww-m5rr-m2rg",
"modified": "2026-11-17T18:31:39Z",
"published": "2026-11-17T18:31:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-100975"
},
{
"type": "WEB",
"url": "https://github.com/NVIDIA/product-security/tree/main/2026/5929"
},
{
"type": "WEB",
"url": "https://www.cve.org/CVERecord?id=CVE-2026-100975"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-GWPF-2PC2-R92W
Vulnerability from github – Published: 2023-11-09 15:30 – Updated: 2023-11-09 15:30A CWE-526: Exposure of Sensitive Information Through Environmental Variables vulnerability exists in Telit Cinterion BGS5, Telit Cinterion EHS5/6/8, Telit Cinterion PDS5/6/8, Telit Cinterion ELS61/81, Telit Cinterion PLS62 that could allow a local, low privileged attacker to get access to a sensitive data on the targeted system.
{
"affected": [],
"aliases": [
"CVE-2023-47615"
],
"database_specific": {
"cwe_ids": [
"CWE-526"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-11-09T13:15:07Z",
"severity": "LOW"
},
"details": "A CWE-526: Exposure of Sensitive Information Through Environmental Variables vulnerability exists in Telit Cinterion BGS5, Telit Cinterion EHS5/6/8, Telit Cinterion PDS5/6/8, Telit Cinterion ELS61/81, Telit Cinterion PLS62 that could allow a local, low privileged attacker to get access to a sensitive data on the targeted system.",
"id": "GHSA-gwpf-2pc2-r92w",
"modified": "2023-11-09T15:30:28Z",
"published": "2023-11-09T15:30:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-47615"
},
{
"type": "WEB",
"url": "https://ics-cert.kaspersky.com/advisories/2023/11/09/klcert-22-212-telit-cinterion-thales-gemalto-modules-exposure-of-sensitive-information-through-environmental-variables"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-H2WG-V8WG-JHXH
Vulnerability from github – Published: 2025-05-28 17:38 – Updated: 2025-05-28 20:07Summary
This advisory addresses a security vulnerability in Mautic where sensitive .env configuration files may be directly accessible via a web browser. This exposure could lead to the disclosure of sensitive information, including database credentials, API keys, and other critical system configurations.
Sensitive Information Disclosure via .env File Exposure: The .env file, which typically contains environment variables and sensitive application configurations, is directly accessible via a web browser due to missing web server configurations that restrict access to such files. This allows an unauthenticated attacker to view the contents of this file by simply navigating to its URL.
Mitigation
Update Mautic to the latest Mautic version.
By default, Mautic does not use .env files for production data.
For Apache users: Ensure your web server is configured to respect .htaccess files.
For Nginx users: As Nginx does not inherently support .htaccess files, you must manually add a configuration block to your Nginx server configuration to deny access to .env files. Add the following to your Nginx configuration for the Mautic site:
location ~ /\.env {
deny all;
}
After modifying your Nginx configuration, remember to reload or restart your Nginx service for the changes to take effect.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "mautic/core"
},
"ranges": [
{
"events": [
{
"introduced": "4.4.0"
},
{
"fixed": "4.4.16"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "mautic/core"
},
"ranges": [
{
"events": [
{
"introduced": "5.0.0-alpha"
},
{
"fixed": "5.2.6"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "mautic/core"
},
"ranges": [
{
"events": [
{
"introduced": "6.0.0-alpha"
},
{
"fixed": "6.0.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-47056"
],
"database_specific": {
"cwe_ids": [
"CWE-312",
"CWE-526"
],
"github_reviewed": true,
"github_reviewed_at": "2025-05-28T17:38:38Z",
"nvd_published_at": "2025-05-28T17:15:23Z",
"severity": "MODERATE"
},
"details": "### Summary \nThis advisory addresses a security vulnerability in Mautic where sensitive `.env` configuration files may be directly accessible via a web browser. This exposure could lead to the disclosure of sensitive information, including database credentials, API keys, and other critical system configurations.\n\nSensitive Information Disclosure via `.env` File Exposure: The `.env` file, which typically contains environment variables and sensitive application configurations, is directly accessible via a web browser due to missing web server configurations that restrict access to such files. This allows an unauthenticated attacker to view the contents of this file by simply navigating to its URL.\n\n### Mitigation\nUpdate Mautic to the latest Mautic version.\nBy default, Mautic does not use `.env` files for production data.\n\n**For Apache users:** Ensure your web server is configured to respect `.htaccess` files.\n\n**For Nginx users:** As Nginx does not inherently support `.htaccess` files, you must manually add a configuration block to your Nginx server configuration to deny access to `.env` files. Add the following to your Nginx configuration for the Mautic site:\n\n```nginx\nlocation ~ /\\.env {\n deny all;\n}\n```\n\nAfter modifying your Nginx configuration, remember to reload or restart your Nginx service for the changes to take effect.",
"id": "GHSA-h2wg-v8wg-jhxh",
"modified": "2025-05-28T20:07:50Z",
"published": "2025-05-28T17:38:38Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/mautic/mautic/security/advisories/GHSA-h2wg-v8wg-jhxh"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-47056"
},
{
"type": "PACKAGE",
"url": "https://github.com/mautic/mautic"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L",
"type": "CVSS_V3"
}
],
"summary": "Mautic does not shield .env files from web traffic"
}
GHSA-H539-C7R8-3XQ4
Vulnerability from github – Published: 2026-09-04 18:03 – Updated: 2026-09-04 18:03Maintainer resolution
The CodeWhale maintainers validated this report. The affected package ranges are recorded in the advisory metadata. Version 0.8.64 contains the fix in commit 26de44a8bd5051f8f944ea60b2c37ae1d2b7d25e. Users should upgrade to 0.8.64 or later. The original reporter analysis is preserved below.
Summary
js_execution exposes parent process environment to model-provided JavaScript
The js_execution tool spawns Node with tokio::process::Command::new without calling the child_env scrubber that exec_shell, the Python REPL, and the MCP launcher all use. Model-provided JavaScript reads process.env and the values flow back to the parent transcript as the tool's stdout, exposing API keys, cloud credentials, and forge tokens to the next model turn.
Details
In crates/tui/src/tools/js_execution.rs (v0.8.37, lines 91-105):
let temp_dir = tempfile::tempdir()
.map_err(|e| ToolError::execution_failed(format!("tempdir failed: {e}")))?;
let script_path = temp_dir.path().join("js_execution.js");
tokio::fs::write(&script_path, code)
.await
.map_err(|e| ToolError::execution_failed(format!("tempfile write failed: {e}")))?;
let mut cmd = tokio::process::Command::new(&node);
cmd.arg(&script_path);
cmd.current_dir(workspace);
let output = tokio::time::timeout(Duration::from_secs(120), cmd.output())
.await
.map_err(|_| ToolError::Timeout { seconds: 120 })
.and_then(|res| res.map_err(|e| ToolError::execution_failed(e.to_string())))?;
The Command is built without cmd.env_clear() and without the project's crate::child_env::apply_to_tokio_command helper. Every variable in the parent process environment is inherited by the spawned node.
For comparison, exec_shell (crates/tui/src/tools/shell.rs:790-792) and the Python REPL (crates/tui/src/repl/runtime.rs:238) both apply the scrubber:
child_env::apply_to_command(&mut cmd, child_env::string_map_env(&exec_env.env));
apply_to_tokio_command calls cmd.env_clear() and then re-installs only the keys that pass is_allowed_parent_env_key (PATH, HOME, USER, LANG/LC_*, TMPDIR, proxy variables, Windows toolchain context, terminal settings). Secret-bearing variables (DEEPSEEK_API_KEY, OPENAI_API_KEY, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, GITHUB_TOKEN, etc.) are not on the allowlist and are dropped before the child starts. The js_execution path bypasses both the env_clear and the allowlist.
Commit history makes the gap explicit. Commit e6d4eae fix(security): scrub child process environments (2026-05-08) introduced child_env.rs and rewrote exec_shell, the Python REPL, the MCP launcher, and main.rs to use it. Commit 2566f3c feat(tools): add js_execution tool (2026-05-12) added this file four days later and never picked up the helper.
The tool is described to the model and surfaced in the approval pane as "Run model-provided JavaScript code in local Node.js execution sandbox" (crates/tui/src/core/engine/turn_loop.rs:1174-1176). No sandbox is applied beyond a 120-second timeout; Node has full filesystem and network access in addition to the inherited environment. The wording understates the trust boundary that the user is being asked to cross.
In YOLO mode (auto_approve=true) the JS body runs without any prompt at all, so a single adversarial prompt-injection from a README, fetched web page, or MCP server output drains the parent environment to the next model turn.
PoC
A standalone Cargo test reproduces the unscrubbed-env behavior. Save as crates/tui/tests/js_execution_env_leak.rs and run with cargo test -p deepseek-tui --test js_execution_env_leak -- --nocapture:
use deepseek_tui::tools::js_execution::execute_js_execution_tool;
use serde_json::json;
use tempfile::tempdir;
#[tokio::test]
async fn js_execution_inherits_parent_secrets() {
if deepseek_tui::dependencies::resolve_node().is_none() {
eprintln!("node not on PATH; skipping");
return;
}
unsafe {
std::env::set_var("AWS_SECRET_ACCESS_KEY", "leak-marker-AKIA-EXAMPLE");
std::env::set_var("DEEPSEEK_API_KEY", "leak-marker-sk-EXAMPLE");
}
let tmp = tempdir().unwrap();
let result = execute_js_execution_tool(
&json!({"code": "console.log(process.env.AWS_SECRET_ACCESS_KEY + '|' + process.env.DEEPSEEK_API_KEY)"}),
tmp.path(),
).await.expect("execute");
let payload: serde_json::Value = serde_json::from_str(&result.content).unwrap();
let stdout = payload["stdout"].as_str().unwrap_or("");
assert!(stdout.contains("leak-marker-AKIA-EXAMPLE"), "AWS leaked: {stdout}");
assert!(stdout.contains("leak-marker-sk-EXAMPLE"), "DEEPSEEK leaked: {stdout}");
}
Equivalent reproducer against the binary:
export AWS_SECRET_ACCESS_KEY="leak-marker-AKIA-EXAMPLE"
export DEEPSEEK_API_KEY="leak-marker-sk-EXAMPLE"
deepseek
# Ask the model to run:
# js_execution({"code":"console.log(JSON.stringify(process.env))"})
# Approve once. The returned stdout contains every parent env value verbatim,
# including the markers above, and is now part of the model's context for the next request.
The fix is one line added next to the existing cmd.current_dir(workspace) call:
let mut cmd = tokio::process::Command::new(&node);
cmd.arg(&script_path);
cmd.current_dir(workspace);
crate::child_env::apply_to_tokio_command(&mut cmd, std::iter::empty::<(&str, &str)>());
This calls the existing helper with no overrides, mirroring how repl/runtime.rs spawns the Python REPL. The behavior the description string already promises (sandbox) is then partially honored: secret-bearing parent variables stay in the parent.
Impact
The tool returns parent-environment secrets to the model on a single approval, or with no approval in YOLO mode. Any variable the user has exported becomes part of the next model request and travels to the configured LLM provider's logs. Common variables that the codebase's own provider clients read from process env, and therefore the values most likely to be present, include DEEPSEEK_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, MISTRAL_API_KEY, AZURE_OPENAI_API_KEY, XAI_API_KEY, GROQ_API_KEY, and TOGETHER_API_KEY. Cloud and source-control credentials commonly exported in developer shells include AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, GOOGLE_APPLICATION_CREDENTIALS, GITHUB_TOKEN, GH_TOKEN, GITLAB_TOKEN, NPM_TOKEN, CARGO_REGISTRY_TOKEN, PYPI_API_TOKEN, and DATABASE_URL-style secrets. The local-sandbox wording shown at approval time understates the trust boundary, so users approving what they read as a sandboxed snippet do not anticipate that every shell-exported credential is reachable from the snippet. The remediation matches the pattern already adopted across exec_shell, the Python REPL, and the MCP launcher, so the gap is a missed call site rather than a design tradeoff.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "deepseek-tui"
},
"ranges": [
{
"events": [
{
"introduced": "0.8.32"
},
{
"last_affected": "0.8.41"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "deepseek-tui"
},
"ranges": [
{
"events": [
{
"introduced": "0.8.32"
},
{
"fixed": "0.8.41"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "crates.io",
"name": "codewhale-tui"
},
"ranges": [
{
"events": [
{
"introduced": "0.8.41"
},
{
"fixed": "0.8.64"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "npm",
"name": "codewhale"
},
"ranges": [
{
"events": [
{
"introduced": "0.8.41"
},
{
"fixed": "0.8.64"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-75915"
],
"database_specific": {
"cwe_ids": [
"CWE-200",
"CWE-526"
],
"github_reviewed": true,
"github_reviewed_at": "2026-09-04T18:03:08Z",
"nvd_published_at": "2026-08-18T16:18:23Z",
"severity": "HIGH"
},
"details": "### Maintainer resolution\n\nThe CodeWhale maintainers validated this report. The affected package ranges are recorded in the advisory metadata. Version 0.8.64 contains the fix in commit 26de44a8bd5051f8f944ea60b2c37ae1d2b7d25e. Users should upgrade to 0.8.64 or later. The original reporter analysis is preserved below.\n\n### Summary\n\njs_execution exposes parent process environment to model-provided JavaScript\n\nThe js_execution tool spawns Node with tokio::process::Command::new without calling the child_env scrubber that exec_shell, the Python REPL, and the MCP launcher all use. Model-provided JavaScript reads process.env and the values flow back to the parent transcript as the tool\u0027s stdout, exposing API keys, cloud credentials, and forge tokens to the next model turn.\n\n### Details\n\nIn `crates/tui/src/tools/js_execution.rs` (v0.8.37, lines 91-105):\n\n```rust\nlet temp_dir = tempfile::tempdir()\n .map_err(|e| ToolError::execution_failed(format!(\"tempdir failed: {e}\")))?;\nlet script_path = temp_dir.path().join(\"js_execution.js\");\ntokio::fs::write(\u0026script_path, code)\n .await\n .map_err(|e| ToolError::execution_failed(format!(\"tempfile write failed: {e}\")))?;\n\nlet mut cmd = tokio::process::Command::new(\u0026node);\ncmd.arg(\u0026script_path);\ncmd.current_dir(workspace);\n\nlet output = tokio::time::timeout(Duration::from_secs(120), cmd.output())\n .await\n .map_err(|_| ToolError::Timeout { seconds: 120 })\n .and_then(|res| res.map_err(|e| ToolError::execution_failed(e.to_string())))?;\n```\n\nThe Command is built without `cmd.env_clear()` and without the project\u0027s `crate::child_env::apply_to_tokio_command` helper. Every variable in the parent process environment is inherited by the spawned `node`.\n\nFor comparison, exec_shell (`crates/tui/src/tools/shell.rs:790-792`) and the Python REPL (`crates/tui/src/repl/runtime.rs:238`) both apply the scrubber:\n\n```rust\nchild_env::apply_to_command(\u0026mut cmd, child_env::string_map_env(\u0026exec_env.env));\n```\n\napply_to_tokio_command calls `cmd.env_clear()` and then re-installs only the keys that pass `is_allowed_parent_env_key` (PATH, HOME, USER, LANG/LC_*, TMPDIR, proxy variables, Windows toolchain context, terminal settings). Secret-bearing variables (DEEPSEEK_API_KEY, OPENAI_API_KEY, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, GITHUB_TOKEN, etc.) are not on the allowlist and are dropped before the child starts. The js_execution path bypasses both the env_clear and the allowlist.\n\nCommit history makes the gap explicit. Commit `e6d4eae fix(security): scrub child process environments` (2026-05-08) introduced child_env.rs and rewrote exec_shell, the Python REPL, the MCP launcher, and main.rs to use it. Commit `2566f3c feat(tools): add js_execution tool` (2026-05-12) added this file four days later and never picked up the helper.\n\nThe tool is described to the model and surfaced in the approval pane as \"Run model-provided JavaScript code in local Node.js execution sandbox\" (`crates/tui/src/core/engine/turn_loop.rs:1174-1176`). No sandbox is applied beyond a 120-second timeout; Node has full filesystem and network access in addition to the inherited environment. The wording understates the trust boundary that the user is being asked to cross.\n\nIn YOLO mode (`auto_approve=true`) the JS body runs without any prompt at all, so a single adversarial prompt-injection from a README, fetched web page, or MCP server output drains the parent environment to the next model turn.\n\n### PoC\n\nA standalone Cargo test reproduces the unscrubbed-env behavior. Save as `crates/tui/tests/js_execution_env_leak.rs` and run with `cargo test -p deepseek-tui --test js_execution_env_leak -- --nocapture`:\n\n```rust\nuse deepseek_tui::tools::js_execution::execute_js_execution_tool;\nuse serde_json::json;\nuse tempfile::tempdir;\n\n#[tokio::test]\nasync fn js_execution_inherits_parent_secrets() {\n if deepseek_tui::dependencies::resolve_node().is_none() {\n eprintln!(\"node not on PATH; skipping\");\n return;\n }\n unsafe {\n std::env::set_var(\"AWS_SECRET_ACCESS_KEY\", \"leak-marker-AKIA-EXAMPLE\");\n std::env::set_var(\"DEEPSEEK_API_KEY\", \"leak-marker-sk-EXAMPLE\");\n }\n let tmp = tempdir().unwrap();\n let result = execute_js_execution_tool(\n \u0026json!({\"code\": \"console.log(process.env.AWS_SECRET_ACCESS_KEY + \u0027|\u0027 + process.env.DEEPSEEK_API_KEY)\"}),\n tmp.path(),\n ).await.expect(\"execute\");\n let payload: serde_json::Value = serde_json::from_str(\u0026result.content).unwrap();\n let stdout = payload[\"stdout\"].as_str().unwrap_or(\"\");\n assert!(stdout.contains(\"leak-marker-AKIA-EXAMPLE\"), \"AWS leaked: {stdout}\");\n assert!(stdout.contains(\"leak-marker-sk-EXAMPLE\"), \"DEEPSEEK leaked: {stdout}\");\n}\n```\n\nEquivalent reproducer against the binary:\n\n```bash\nexport AWS_SECRET_ACCESS_KEY=\"leak-marker-AKIA-EXAMPLE\"\nexport DEEPSEEK_API_KEY=\"leak-marker-sk-EXAMPLE\"\ndeepseek\n# Ask the model to run:\n# js_execution({\"code\":\"console.log(JSON.stringify(process.env))\"})\n# Approve once. The returned stdout contains every parent env value verbatim,\n# including the markers above, and is now part of the model\u0027s context for the next request.\n```\n\nThe fix is one line added next to the existing `cmd.current_dir(workspace)` call:\n\n```rust\nlet mut cmd = tokio::process::Command::new(\u0026node);\ncmd.arg(\u0026script_path);\ncmd.current_dir(workspace);\ncrate::child_env::apply_to_tokio_command(\u0026mut cmd, std::iter::empty::\u003c(\u0026str, \u0026str)\u003e());\n```\n\nThis calls the existing helper with no overrides, mirroring how repl/runtime.rs spawns the Python REPL. The behavior the description string already promises (sandbox) is then partially honored: secret-bearing parent variables stay in the parent.\n\n### Impact\n\nThe tool returns parent-environment secrets to the model on a single approval, or with no approval in YOLO mode. Any variable the user has exported becomes part of the next model request and travels to the configured LLM provider\u0027s logs. Common variables that the codebase\u0027s own provider clients read from process env, and therefore the values most likely to be present, include DEEPSEEK_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY, MISTRAL_API_KEY, AZURE_OPENAI_API_KEY, XAI_API_KEY, GROQ_API_KEY, and TOGETHER_API_KEY. Cloud and source-control credentials commonly exported in developer shells include AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, GOOGLE_APPLICATION_CREDENTIALS, GITHUB_TOKEN, GH_TOKEN, GITLAB_TOKEN, NPM_TOKEN, CARGO_REGISTRY_TOKEN, PYPI_API_TOKEN, and DATABASE_URL-style secrets. The local-sandbox wording shown at approval time understates the trust boundary, so users approving what they read as a sandboxed snippet do not anticipate that every shell-exported credential is reachable from the snippet. The remediation matches the pattern already adopted across exec_shell, the Python REPL, and the MCP launcher, so the gap is a missed call site rather than a design tradeoff.",
"id": "GHSA-h539-c7r8-3xq4",
"modified": "2026-09-04T18:03:08Z",
"published": "2026-09-04T18:03:08Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Hmbown/CodeWhale/security/advisories/GHSA-h539-c7r8-3xq4"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-75915"
},
{
"type": "WEB",
"url": "https://github.com/Hmbown/CodeWhale/commit/26de44a8bd5051f8f944ea60b2c37ae1d2b7d25e"
},
{
"type": "PACKAGE",
"url": "https://github.com/Hmbown/CodeWhale"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/codewhale-before-environment-variable-leak-via-js-execution"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "CodeWhale: js_execution leaks parent environment to model context via missing env scrub"
}
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.