Intel

AIKIDO-2026-222906

@electron/asar is vulnerable to Path Traversal

Path Traversal Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published 4 days ago

66

Medium Risk

This Affects:

JS@electron/asar
3.2.1 - 4.2.0
Fixed in 4.2.1
Are you affected? Scan for Free

TL;DR

@electron/asar reads, extracts, and packs ASAR archives without fully validating the untrusted header, file offsets, or entry paths. A crafted archive can declare an oversized header or file size that triggers large buffer allocations, supply offsets that read outside the archive bounds, use .. sequences in unpacked-file names to read files outside the .unpacked directory, or contain circular symlinks that cause unbounded recursion. Packing a source directory that contains symlinks with absolute or traversing targets could also place links outside the destination package. The fix adds strict header and offset validation, constrains unpacked reads and extraction to the target directory, and adds circular-symlink detection with a depth limit.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application uses this library to read, extract, or pack untrusted ASAR archives or source directories.

Background info

@electron/asar is vulnerable to Path Traversal in versions 3.2.1 - 4.2.0.

How to fix this

Upgrade the @electron/asar library to the patch version.