CVE-2026-43942: Electerm Electerm's Full Process.env Exposed To Vulnerability

MODERATE
Advisory Identifier: GHSA-37j4-88rp-2f6h
CVSS 6.5
CWE-312 CWE-200
Published
Advisory Summary

CVE-2026-43942 is a MODERATE (CVSS 6.5) electerm's full process.env exposed to vulnerability (CWE-312: Cleartext Storage of Sensitive Information) affecting Electerm libraries in the npm ecosystem. The issue involves electerm's full process.env exposed to renderer via window.pre.env. Remediation is available in the latest vendor maintenance releases.

CVE-2026-43942 at a Glance

CVE Identifier CVE-2026-43942
GHSA Identifier GHSA-37j4-88rp-2f6h
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-312: Cleartext Storage of Sensitive Information
Affected Product Electerm
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-43942

To remediate this vulnerability, upgrade all affected Electerm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

electerm fixed: Latest secure release
npm install electerm@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls electerm

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-43942, inspect your project dependencies using npm:

npm ls electerm

Analyze the terminal output to locate any version of Electerm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The npm ls electerm command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-312: Cleartext Storage of Sensitive Information, where the product stores sensitive information in cleartext within a resource that might be accessible to another control sphere. In Electerm, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact The `getConstants()` IPC handler in `src/app/lib/ipc-sync.js` serialises the entire `process.env` object and sends it to the renderer. The data is stored as `window.pre.env` and is accessible from any JavaScript running in the renderer (e.g., via the DevTools console or a compromised webview context). On developer and CI machines, `process.env` routinely contains secrets such as: - `AWS_SECRET_ACCESS_KEY` / `AWS_SESSION_TOKEN` - `GITHUB_TOKEN` / `NPM_TOKEN` - `OPENAI_API_KEY` / `DOCKER_AUTH` - Internal service credentials, API keys, and database URLs An attacker who achieves any JavaScript execution within the renderer—for example, through a malicious plugin, a cross-site scripting (XSS) flaw, or the terminal hyperlink execution chain—can trivially exfiltrate these secrets to a remote server, leading to cloud account compromise, supply chain attacks, and lateral movement. The exposure is visible even without any code execution by simply opening the "Info" modal in the application, though that requires local access. ### Patches A patch is yet to be available. ### Workarounds Until a patch is released: - Avoid launching electerm with sensitive environment variables set. Use shell scripts or a dedicated terminal profile that clears secrets before starting the application. - Do not install plugins from untrusted sources, and audit any installed plugins for network access. - Keep the renderer context as locked down as possible: disable the remote debugging port, and do not paste untrusted code into the DevTools console. ### Resources - [electerm GitHub Repository](https://github.com/electerm/electerm) - [electerm Security Policy](https://github.com/electerm/electerm/security) - Vulnerability details originally reported by external researcher (confirmed on v3.7.9, Win10).

CVE-2026-43942 Affected Electerm Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
electerm
npm
≤ 3.8.15

References

Frequently Asked Questions

What is CVE-2026-43942?
CVE-2026-43942 is a security vulnerability in Electerm involving Electerm's full process.env exposed to renderer via window.pre.env under CWE-312: Cleartext Storage of Sensitive Information.
Which Electerm versions are affected?
Affected versions include releases prior to current release patches across affected packages: electerm.
What version fixes CVE-2026-43942?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is electerm affected?
Yes, electerm is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2026-43942?
CVE-2026-43942 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-43942?
CVE-2026-43942 is classified under CWE-312: Cleartext Storage of Sensitive Information (The product stores sensitive information in cleartext within a resource that might be accessible to another control sphere.).
How can I check npm dependencies for CVE-2026-43942?
Run the dependency tree command: 'npm ls electerm'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-37j4-88rp-2f6h",
  "modified" : "2026-05-08T18:37:42Z",
  "published" : "2026-05-08T18:37:42Z",
  "aliases" : [ "CVE-2026-43942" ],
  "summary" : "Electerm's full process.env exposed to renderer via window.pre.env",
  "details" : "### Impact\n\nThe `getConstants()` IPC handler in `src/app/lib/ipc-sync.js` serialises the entire `process.env` object and sends it to the renderer. The data is stored as `window.pre.env` and is accessible from any JavaScript running in the renderer (e.g., via the DevTools console or a compromised webview context).\n\nOn developer and CI machines, `process.env` routinely contains secrets such as:\n\n- `AWS_SECRET_ACCESS_KEY` / `AWS_SESSION_TOKEN`\n- `GITHUB_TOKEN` / `NPM_TOKEN`\n- `OPENAI_API_KEY` / `DOCKER_AUTH`\n- Internal service credentials, API keys, and database URLs\n\nAn attacker who achieves any JavaScript execution within the renderer—for example, through a malicious plugin, a cross-site scripting (XSS) flaw, or the terminal hyperlink execution chain—can trivially exfiltrate these secrets to a remote server, leading to cloud account compromise, supply chain attacks, and lateral movement. The exposure is visible even without any code execution by simply opening the \"Info\" modal in the application, though that requires local access.\n\n### Patches\n\nA patch is yet to be available.\n\n### Workarounds\n\nUntil a patch is released:\n- Avoid launching electerm with sensitive environment variables set. Use shell scripts or a dedicated terminal profile that clears secrets before starting the application.\n- Do not install plugins from untrusted sources, and audit any installed plugins for network access.\n- Keep the renderer context as locked down as possible: disable the remote debugging port, and do not paste untrusted code into the DevTools console.\n\n### Resources\n- [electerm GitHub Repository](https://github.com/electerm/electerm)\n- [electerm Security Policy](https://github.com/electerm/electerm/security)\n- Vulnerability details originally reported by external researcher (confirmed on v3.7.9, Win10).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electerm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "3.8.15"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/electerm/electerm/security/advisories/GHSA-37j4-88rp-2f6h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-43942"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/electerm/electerm"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-312" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-08T18:37:42Z",
    "nvd_published_at" : "2026-05-08T04:16:23Z"
  }
}