CVE-2024-46993: Electron Electron Vulnerable To Heap Buffer Vulnerability
MODERATECVE-2024-46993 is a MODERATE electron vulnerable to heap buffer vulnerability (CWE-122: Heap-based Buffer Overflow) affecting Electron libraries in the npm ecosystem. The issue involves electron vulnerable to heap buffer overflow in nativeimage. Remediation is available by upgrading affected packages to version 28.3.2, 29.3.3, 30.0.3.
CVE-2024-46993 at a Glance
How to Fix CVE-2024-46993
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.
npm install electron@28.3.2
npm install electron@29.3.3
npm install electron@30.0.3
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-2024-46993, 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 28.3.2), 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-122: Heap-based Buffer Overflow, where a heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated in the heap portion of memory, generally meaning that the buffer was allocated using a routine such as malloc(). 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
CVE-2024-46993 Affected Electron Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
electron
|
npm |
< 28.3.2
|
28.3.2
|
|
electron
|
npm |
≥ 29.0.0-alpha.1
< 29.3.3
|
29.3.3
|
|
electron
|
npm |
≥ 30.0.0-alpha.1
< 30.0.3
|
30.0.3
|
References
Frequently Asked Questions
What is CVE-2024-46993?
Which Electron versions are affected?
What version fixes CVE-2024-46993?
Is electron affected?
What CWE is associated with CVE-2024-46993?
How can I check npm dependencies for CVE-2024-46993?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6r2x-8pq8-9489",
"modified" : "2025-07-01T13:13:25Z",
"published" : "2025-06-30T18:41:08Z",
"aliases" : [ "CVE-2024-46993" ],
"summary" : "Electron vulnerable to Heap Buffer Overflow in NativeImage",
"details" : "### Impact\nThe `nativeImage.createFromPath()` and `nativeImage.createFromBuffer()` functions call a function downstream that is vulnerable to a heap buffer overflow. An Electron program that uses either of the affected functions is vulnerable to a buffer overflow if an attacker is in control of the image's height, width, and contents.\n\n### Workaround\nThere are no app-side workarounds for this issue. You must update your Electron version to be protected.\n\n### Patches\n\n- `v28.3.2`\n- `v29.3.3`\n- `v30.0.3`\n\n### For More Information\n\nIf you have any questions or comments about this advisory, email us at [security@electronjs.org](mailto:security@electronjs.org).",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "electron"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "28.3.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "electron"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "29.0.0-alpha.1"
}, {
"fixed" : "29.3.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "electron"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "30.0.0-alpha.1"
}, {
"fixed" : "30.0.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/electron/electron/security/advisories/GHSA-6r2x-8pq8-9489"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-46993"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/electron/electron"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-122" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-06-30T18:41:08Z",
"nvd_published_at" : "2025-07-01T03:15:21Z"
}
}