Intel

AIKIDO-2026-300739

mammoth is vulnerable to Path Traversal

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

59

Medium Risk

This Affects:

PYTHONmammoth
0.1.2 - 1.12.0
Fixed in 1.12.1
Are you affected? Scan for Free

TL;DR

The command-line interface writes extracted document images into the directory given by --output-dir, deriving each image file extension from the content type declared inside the document. On Windows a content type that contains backslash path segments is used unmodified, so the generated image filename can contain directory separators and traversal segments. Converting a crafted document then writes image files outside the intended output directory. The fix derives the extension by splitting the content type on both forward and back slashes so it can no longer contain path separators.

Who does this affect?

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

Background info

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

How to fix this

Upgrade the mammoth library to the patch version.