Intel

AIKIDO-2026-395368

@jsonjoy.com/fs-snapshot is vulnerable to Path Traversal

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

59

Medium Risk

This Affects:

JS@jsonjoy.com/fs-snapshot
4.2.0 - 4.57.6
Fixed in 4.57.7
Are you affected? Scan for Free

TL;DR

The package restores filesystem snapshots by recreating folder entries under a caller-specified root directory. During restore, folder entry names were concatenated directly into target paths without rejecting ., .., or path separators. A crafted snapshot could use traversal-style entry names such as ../escaped.txt to write files outside the intended restore directory. The fix validates each entry name before recursion and rejects unsafe names across sync, async, JSON, and binary restore paths.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application restores snapshots from untrusted or attacker-influenced sources.

Background info

@jsonjoy.com/fs-snapshot is vulnerable to Path Traversal in versions 4.2.0 - 4.57.6.

How to fix this

Upgrade the @jsonjoy.com/fs-snapshot library to the patch version.