Vulnerabilities in pkg:npm/electorn

PACKAGE
Advisory Summary

GHSA-38hx-3542-8fh3 is a CRITICAL malicious code vulnerability (CWE-506: Embedded Malicious Code) affecting Electorn libraries in the npm ecosystem. The issue involves malicious code in `electorn`. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/electorn

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/electorn. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-38hx-3542-8fh3 - CRITICAL Malicious code in `electorn`

GHSA-38hx-3542-8fh3 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-38hx-3542-8fh3
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-506: Embedded Malicious Code
Affected Product Electorn
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-38hx-3542-8fh3

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

electorn fixed: Latest secure release
npm install electorn@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 electorn

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-38hx-3542-8fh3, inspect your project dependencies using npm:

npm ls electorn

Analyze the terminal output to locate any version of Electorn 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 electorn 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-506: Embedded Malicious Code, where the product contains code that appears to be malicious in nature. In Electorn, 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

npm packages `loadyaml` and `electorn` were removed from the npm registry for containing malicious code. Upon installation the package runs a preinstall script that writes a public comment on GitHub containing the following information: - IP and IP-based geolocation - home directory name - local username The malicious packages have been removed from the npm registry and the leaked content removed from GitHub.

GHSA-38hx-3542-8fh3 Affected Electorn Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
electorn
npm
≤ 10.0.0

References

Frequently Asked Questions

What is GHSA-38hx-3542-8fh3?
GHSA-38hx-3542-8fh3 is a security vulnerability in Electorn involving Malicious code in `electorn` under CWE-506: Embedded Malicious Code.
Which Electorn versions are affected?
Affected versions include releases prior to current release patches across affected packages: electorn.
What version fixes GHSA-38hx-3542-8fh3?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is electorn affected?
Yes, electorn is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-38hx-3542-8fh3?
GHSA-38hx-3542-8fh3 is classified under CWE-506: Embedded Malicious Code (The product contains code that appears to be malicious in nature.).
How can I check npm dependencies for GHSA-38hx-3542-8fh3?
Run the dependency tree command: 'npm ls electorn'. 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-38hx-3542-8fh3",
  "modified" : "2020-10-01T17:09:44Z",
  "published" : "2020-10-01T17:09:56Z",
  "aliases" : [ ],
  "summary" : "Malicious code in `electorn`",
  "details" : "npm packages `loadyaml` and `electorn` were removed from the npm registry for containing malicious code. Upon installation the package runs a preinstall script that writes a public comment on GitHub containing the following information:\n- IP and IP-based geolocation\n- home directory name\n- local username \n\nThe malicious packages have been removed from the npm registry and the leaked content removed from GitHub.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electorn"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "10.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1562"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-506" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-10-01T17:09:44Z",
    "nvd_published_at" : null
  }
}