CVE-2023-44402: Electron ASAR Integrity Bypass Vulnerability

MODERATE
Advisory Identifier: GHSA-7m48-wc93-9g85
CVSS 6.1
CWE-345
Published
Advisory Summary

CVE-2023-44402 is a MODERATE (CVSS 6.1) asar integrity bypass vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting Electron libraries in the npm ecosystem. The issue involves asar integrity bypass via filetype confusion in electron. Remediation is available by upgrading affected packages to version 22.3.24, 24.8.3, 25.8.1, 26.2.1, 27.0.0-alpha.7.

CVE-2023-44402 at a Glance

CVE Identifier CVE-2023-44402
GHSA Identifier GHSA-7m48-wc93-9g85
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-345: Insufficient Verification of Data Authenticity
Affected Product Electron
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.1

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

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

How to Fix CVE-2023-44402

To remediate this vulnerability, upgrade all affected Electron 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 fixed: 22.3.24
npm install electron@22.3.24
electron fixed: 24.8.3
npm install electron@24.8.3
electron fixed: 25.8.1
npm install electron@25.8.1
electron fixed: 26.2.1
npm install electron@26.2.1
electron fixed: 27.0.0-alpha.7
npm install electron@27.0.0-alpha.7
electron fixed: Latest secure release
npm install electron@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 electron

How to Check if You Are Affected

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

npm ls electron

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

Note: The npm ls electron 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-345: Insufficient Verification of Data Authenticity, where the product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. In Electron, 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 This only impacts apps that have the `embeddedAsarIntegrityValidation` and `onlyLoadAppFromAsar` [fuses](https://www.electronjs.org/docs/latest/tutorial/fuses) enabled. Apps without these fuses enabled are not impacted. This issue is specific to macOS as these fuses are only currently supported on macOS. Specifically this issue can only be exploited if your app is launched from a filesystem the attacker has write access too. i.e. the ability to edit files inside the `resources` folder in your app installation on Windows which these fuses are supposed to protect against. ### Workarounds There are no app side workarounds, you must update to a patched version of Electron. ### Fixed Versions * `27.0.0-alpha.7` * `26.2.1` * `25.8.1` * `24.8.3` * `22.3.24` ### For more information If you have any questions or comments about this advisory, email us at [security@electronjs.org](mailto:security@electronjs.org)

CVE-2023-44402 Affected Electron Versions

6 component(s)
Fixed Versions:
22.3.2424.8.325.8.126.2.127.0.0-alpha.7
Product / Package Ecosystem Affected Versions Fixed Version
electron
npm
< 22.3.24
22.3.24
electron
npm
≥ 24.0.0-alpha.1
< 24.8.3
24.8.3
electron
npm
≥ 25.0.0-alpha.1
< 25.8.1
25.8.1
electron
npm
≥ 26.0.0-alpha.1
< 26.2.1
26.2.1
electron
npm
≥ 27.0.0-alpha.1
< 27.0.0-alpha.7
27.0.0-alpha.7
electron
npm
≥ 23.0.0-alpha.1
≤ 23.3.13

References

Frequently Asked Questions

What is CVE-2023-44402?
CVE-2023-44402 is a security vulnerability in Electron involving ASAR Integrity bypass via filetype confusion in electron under CWE-345: Insufficient Verification of Data Authenticity.
Which Electron versions are affected?
Affected versions include releases prior to 22.3.24, 24.8.3, 25.8.1, 26.2.1, 27.0.0-alpha.7 across affected packages: electron.
What version fixes CVE-2023-44402?
Upgrading to 22.3.24, 24.8.3, 25.8.1, 26.2.1, 27.0.0-alpha.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is electron affected?
Yes, electron is affected in releases prior to 22.3.24, 24.8.3, 25.8.1, 26.2.1, 27.0.0-alpha.7, Latest secure release. Upgrade your dependency to 22.3.24, 24.8.3, 25.8.1, 26.2.1, 27.0.0-alpha.7, Latest secure release or later.
What is the CVSS score of CVE-2023-44402?
CVE-2023-44402 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:L.
What CWE is associated with CVE-2023-44402?
CVE-2023-44402 is classified under CWE-345: Insufficient Verification of Data Authenticity (The product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data.).
How can I check npm dependencies for CVE-2023-44402?
Run the dependency tree command: 'npm ls electron'. 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-7m48-wc93-9g85",
  "modified" : "2024-09-18T20:13:40Z",
  "published" : "2023-12-01T21:32:06Z",
  "aliases" : [ "CVE-2023-44402" ],
  "summary" : "ASAR Integrity bypass via filetype confusion in electron",
  "details" : "### Impact\nThis only impacts apps that have the `embeddedAsarIntegrityValidation` and `onlyLoadAppFromAsar` [fuses](https://www.electronjs.org/docs/latest/tutorial/fuses) enabled.  Apps without these fuses enabled are not impacted.  This issue is specific to macOS as these fuses are only currently supported on macOS.\n\nSpecifically this issue can only be exploited if your app is launched from a filesystem the attacker has write access too.  i.e. the ability to edit files inside the `resources` folder in your app installation on Windows which these fuses are supposed to protect against.\n\n### Workarounds\nThere are no app side workarounds, you must update to a patched version of Electron.\n\n### Fixed Versions\n* `27.0.0-alpha.7`\n* `26.2.1`\n* `25.8.1`\n* `24.8.3`\n* `22.3.24`\n\n### For more information\nIf you have any questions or comments about this advisory, email us at [security@electronjs.org](mailto:security@electronjs.org)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "22.3.24"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "24.0.0-alpha.1"
      }, {
        "fixed" : "24.8.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "25.0.0-alpha.1"
      }, {
        "fixed" : "25.8.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "26.0.0-alpha.1"
      }, {
        "fixed" : "26.2.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "27.0.0-alpha.1"
      }, {
        "fixed" : "27.0.0-alpha.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "electron"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "23.0.0-alpha.1"
      }, {
        "last_affected" : "23.3.13"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/electron/electron/security/advisories/GHSA-7m48-wc93-9g85"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-44402"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/electron/electron/pull/39788"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/electron/electron"
  }, {
    "type" : "WEB",
    "url" : "https://www.electronjs.org/docs/latest/tutorial/fuses"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-345" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-01T21:32:06Z",
    "nvd_published_at" : "2023-12-01T22:15:09Z"
  }
}