Miggo Logo

CVE-2023-44402:
ASAR Integrity bypass via filetype confusion in electron

6.1

CVSS Score
3.1

Basic Information

EPSS Score
0.31041%
Published
12/1/2023
Updated
9/18/2024
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:L/I:H/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
electronnpm< 22.3.2422.3.24
electronnpm>= 24.0.0-alpha.1, < 24.8.324.8.3
electronnpm>= 25.0.0-alpha.1, < 25.8.125.8.1
electronnpm>= 26.0.0-alpha.1, < 26.2.126.2.1
electronnpm>= 27.0.0-alpha.1, < 27.0.0-alpha.727.0.0-alpha.7
electronnpm>= 23.0.0-alpha.1, <= 23.3.13

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper validation of ASAR file integrity. The GitHub PR #39788 fix explicitly addresses this by ensuring loaded files are actual ASAR archives, not just files with .asar extensions. The ElectronMain function in electron_main.cc is the entry point for app initialization and ASAR handling. The vulnerability occurred because this function (or its dependencies) checked the file path extension but not the file's actual content structure. The fix adds validation of the ASAR magic bytes, indicating the original code lacked this critical check. This matches the CWE-345 (Insufficient Verification of Data Authenticity) classification in the advisory.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

### Imp**t T*is only imp**ts *pps t**t **v* t** `*m*******s*rInt**rityV*li**tion` *n* `onlyLo***pp*rom*s*r` [*us*s](*ttps://www.*l**tronjs.or*/*o*s/l*t*st/tutori*l/*us*s) *n**l**. *pps wit*out t**s* *us*s *n**l** *r* not imp**t**. T*is issu* is sp*

Reasoning

T** vuln*r**ility st*ms *rom improp*r `v*li**tion` o* *S*R *il* int**rity. T** *it*u* PR #***** *ix *xpli*itly ***r*ss*s t*is *y *nsurin* lo**** *il*s *r* **tu*l *S*R *r**iv*s, not just *il*s wit* `.*s*r` *xt*nsions. T** `*l**tronM*in` *un*tion in `*