Intel

AIKIDO-2026-671328

mapshaper is vulnerable to Path Traversal

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

61

Medium Risk

This Affects:

JSmapshaper
0.1.3 - 0.7.26
Fixed in 0.7.27
Are you affected? Scan for Free

TL;DR

The export path in mapshaper uses a layer's name directly as the output file basename in assignUniqueLayerNames. Because layer names are derived from input data (for example a TopoJSON object key), a crafted input file can supply a name containing path separators, a NULL byte, or a Windows drive prefix, causing output files to be written outside the intended output directory. This allows arbitrary file write or overwrite when a victim converts an untrusted file. The fix rejects layer names that resolve to unsafe filenames before any file is written.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Background info

mapshaper is vulnerable to Path Traversal in versions 0.1.3 - 0.7.26.

How to fix this

Upgrade the mapshaper library to the patch version.