CVE-2025-55305: Electron has ASAR Integrity Bypass via resource modification
6.1
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| electron | npm | < 35.7.5 | 35.7.5 |
| electron | npm | >= 36.0.0-alpha.1, < 36.8.1 | 36.8.1 |
| electron | npm | >= 37.0.0-alpha.1, < 37.3.1 | 37.3.1 |
| electron | npm | >= 38.0.0-alpha.1, < 38.0.0-beta.6 | 38.0.0-beta.6 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability lies in the lack of integrity validation for the V8 snapshot when an Electron application is launched. This allows an attacker with local file system access to modify the snapshot and achieve arbitrary code execution. The analysis of the provided patches reveals two key functions that contribute to this vulnerability.
-
gin::GetMappedFileData: This function ingin/v8_initializer.ccis directly responsible for loading the V8 snapshot data. The patches show the addition of a call toSnapshotValidator().Run(data), which performs the integrity check. Before this change, the function would map the snapshot file into memory without any validation, making it the direct point of failure where a malicious snapshot would be processed. -
ElectronMainDelegate::ElectronMainDelegate: This constructor inshell/app/electron_main_delegate.ccis the entry point for configuring the application's behavior. The patch modifies it from a default constructor to one that explicitly callsgin::SetV8SnapshotValidator. This new call registers the validation function thatGetMappedFileDatawill use. The original default constructor lacked this setup, meaning the validation mechanism was never enabled, thus creating the security hole.
Both functions are critical to understanding the vulnerability. ElectronMainDelegate::ElectronMainDelegate is where the security measure should have been initiated, and gin::GetMappedFileData is where the unvalidated data was consumed. During exploitation, a profiler would show ElectronMainDelegate::ElectronMainDelegate being called during application startup, and gin::GetMappedFileData being called when the V8 engine is initialized and the snapshot is loaded.