Intel

AIKIDO-2026-910675

mammoth is vulnerable to Path Traversal

Path Traversal Pre-CVE
Found by Aikido Intel before public disclosure or CVE publication.
Published Aug 10, 2026

59

Medium Risk

This Affects:

JSmammoth
0.2.0 - 1.12.0
Fixed in 1.12.1
Are you affected? Scan for Free

TL;DR

The command-line interface extracts embedded images to the directory given by --output-dir, deriving each filename's extension from the image content type taken from the document. On Windows a backslash in the content type subpart is treated as a path separator, so a crafted content type such as image/gif\..\ yields a filename that escapes the output directory. Converting an untrusted document can therefore write image files to locations outside the intended directory. The fix parses the extension by splitting on both forward slashes and backslashes so the content type can no longer alter the output path.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you use the command-line interface with the --output-dir option on Windows to convert untrusted documents.

Background info

mammoth is vulnerable to Path Traversal in versions 0.2.0 - 1.12.0.

How to fix this

Upgrade the mammoth library to the patch version.