CVE-2024-29900
📋 TL;DR
Electron Packager versions before 18.3.1 leak random segments of Node.js heap memory into bundled executables, potentially exposing sensitive information like environment variables or secrets. This affects developers who use Electron Packager to create distributable applications. The vulnerability occurs during the packaging process, not at runtime.
💻 Affected Systems
- Electron Packager
📦 What is this software?
Packager by Openjsf
⚠️ Risk & Real-World Impact
Worst Case
Attackers extract bundled executables and recover sensitive secrets, API keys, or credentials from leaked memory, leading to full system compromise.
Likely Case
Developers inadvertently distribute applications containing fragments of sensitive data, which could be discovered through reverse engineering or memory analysis.
If Mitigated
With proper secrets management and patched versions, no sensitive data is exposed in distributed applications.
🎯 Exploit Status
Exploitation requires access to the packaged executable and memory analysis tools to extract leaked data.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 18.3.1
Vendor Advisory: https://github.com/electron/packager/security/advisories/GHSA-34h3-8mw4-qw57
Restart Required: No
Instructions:
1. Update Electron Packager to version 18.3.1 or later using npm: npm update electron-packager. 2. Rebuild all previously packaged applications with the updated version. 3. Distribute the newly built applications to replace any vulnerable versions.
🔧 Temporary Workarounds
Manual memory clearing before packaging
allClear sensitive environment variables and memory before running the packaging process
unset SENSITIVE_VARIABLE
node --expose-gc && gc()
🧯 If You Can't Patch
- Avoid storing sensitive data in environment variables during build process
- Use separate build environments without production secrets
🔍 How to Verify
Check if Vulnerable:
Check Electron Packager version: npm list electron-packager
Check Version:
npm list electron-packager
Verify Fix Applied:
Verify version is 18.3.1 or higher: npm list electron-packager | grep electron-packager
📡 Detection & Monitoring
Log Indicators:
- Unusual memory usage patterns during packaging process
- Packaging failures or warnings
Network Indicators:
- None - this is a build-time issue
SIEM Query:
Process execution logs showing electron-packager versions before 18.3.1
🔗 References
- https://github.com/electron/packager/commit/d421d4bd3ced889a4143c5c3ab6d95e3be249eee
- https://github.com/electron/packager/security/advisories/GHSA-34h3-8mw4-qw57
- https://github.com/electron/packager/commit/d421d4bd3ced889a4143c5c3ab6d95e3be249eee
- https://github.com/electron/packager/security/advisories/GHSA-34h3-8mw4-qw57