CVE-2024-46993 — electron
CVE-2024-46993 is a CWE-122 vulnerability in electron. A fix is available for electron — see the affected versions and patch details below.
Electron Vulnerable to Heap Buffer Overflow in NativeImage::CreateFromPath
Exploitation Status
No confirmed exploitation observed yet
- A successful exploit gives an attacker total control of the affected component, not partial access.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2024-46993.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
electronnpmDescription
Impact
The 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.
Workaround
There are no app-side workarounds for this issue. You must update your Electron version to be protected.
Patches
v28.3.2v29.3.3v30.0.3
For More Information
If you have any questions or comments about this advisory, email us at [email protected].
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | electron | all versions | 28.3.2npm install electron@28.3.2 |
| 📦npm | electron | ≥ 29.0.0-alpha.1&&< 29.3.3 | 29.3.3npm install electron@29.3.3 |
| 📦npm | electron | ≥ 30.0.0-alpha.1&&< 30.0.3 | 30.0.3npm install electron@30.0.3 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for electron, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update electron to 28.3.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2024-46993 is resolved across your whole dependency graph.
Workarounds
Stop feeding it untrusted input: reject or quarantine files and payloads from unverified sources until you can upgrade, restrict accepted formats to the ones you actually need, and run the parsing or decoding step in a least-privileged sandbox or short-lived worker so a crash or corrupted read cannot reach the rest of the process.
Frequently Asked Questions
Is CVE-2024-46993 in your dependencies?
Find it across npm, including transitive dependencies.