Vulnerabilities in pkg:npm/@electron/packager

PACKAGE
Advisory Identifier: GHSA-34h3-8mw4-qw57
Advisory Summary

CVE-2024-29900 is a HIGH (CVSS 7.5) @electron/packager's build process memory potentially vulnerability (CWE-402: Transmission of Private Resources into a New Sphere ('Resource Leak')) affecting @electron/packager libraries in the npm ecosystem. The issue involves @electron/packager's build process memory potentially leaked into final executable. Remediation is available by upgrading affected packages to version 18.3.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@electron/packager

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-34h3-8mw4-qw57 CVE-2024-29900 HIGH @electron/packager's build process memory potentially leaked into final executable

CVE-2024-29900 at a Glance

CVE Identifier CVE-2024-29900
GHSA Identifier GHSA-34h3-8mw4-qw57
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-402: Transmission of Private Resources into a New Sphere ('Resource Leak')
Affected Product @electron/packager
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
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-2024-29900

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

@electron/packager fixed: 18.3.1
npm install @electron/packager@18.3.1
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 @electron/packager

How to Check if You Are Affected

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

npm ls @electron/packager

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

Note: The npm ls @electron/packager 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-402: Transmission of Private Resources into a New Sphere ('Resource Leak'), where the product makes resources available to untrusted parties when those resources are only intended to be accessed by the product. In @electron/packager, 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 A random segment of ~1-10kb of Node.js heap memory allocated either side of a known buffer will be leaked into the final executable. This memory _could_ contain sensitive information such as environment variables, secrets files, etc. ### Patches This issue is patched in 18.3.1 ### Workarounds No workarounds, please update to a patched version of `@electron/packager` immediately if impacated.

CVE-2024-29900 Affected @electron/packager Versions

1 component(s)
Fixed Versions:
18.3.1
Product / Package Ecosystem Affected Versions Fixed Version
@electron/packager
npm
≥ 18.3.0
< 18.3.1
All 1 versions
18.3.0
18.3.1

References

Frequently Asked Questions

What is CVE-2024-29900?
CVE-2024-29900 is a security vulnerability in @electron/packager involving @electron/packager's build process memory potentially leaked into final executable under CWE-402: Transmission of Private Resources into a New Sphere ('Resource Leak').
Which @electron/packager versions are affected?
Affected versions include releases prior to 18.3.1 across affected packages: @electron/packager.
What version fixes CVE-2024-29900?
Upgrading to 18.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @electron/packager affected?
Yes, @electron/packager is affected in releases prior to 18.3.1. Upgrade your dependency to 18.3.1 or later.
What is the CVSS score of CVE-2024-29900?
CVE-2024-29900 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-29900?
CVE-2024-29900 is classified under CWE-402: Transmission of Private Resources into a New Sphere ('Resource Leak') (The product makes resources available to untrusted parties when those resources are only intended to be accessed by the product.).
How can I check npm dependencies for CVE-2024-29900?
Run the dependency tree command: 'npm ls @electron/packager'. 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-34h3-8mw4-qw57",
  "modified" : "2024-03-29T20:16:22Z",
  "published" : "2024-03-29T20:16:22Z",
  "aliases" : [ "CVE-2024-29900" ],
  "summary" : "@electron/packager's build process memory potentially leaked into final executable",
  "details" : "### Impact\nA random segment of ~1-10kb of Node.js heap memory allocated either side of a known buffer will be leaked into the final executable. This memory _could_ contain sensitive information such as environment variables, secrets files, etc.\n\n### Patches\nThis issue is patched in 18.3.1\n\n### Workarounds\nNo workarounds, please update to a patched version of `@electron/packager` immediately if impacated.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@electron/packager"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "18.3.0"
      }, {
        "fixed" : "18.3.1"
      } ]
    } ],
    "versions" : [ "18.3.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/electron/packager/security/advisories/GHSA-34h3-8mw4-qw57"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-29900"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/electron/packager/commit/d421d4bd3ced889a4143c5c3ab6d95e3be249eee"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/electron/packager"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-402" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-29T20:16:22Z",
    "nvd_published_at" : "2024-03-29T16:15:08Z"
  }
}