Skip to main content

Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in mammoth

CVE-2025-11849

  • mammoth
  • Mammoth
  • org.zwobble.mammoth:mammoth
Severity Medium
Score 5.4/10

Summary

Versions of the Python package mammoth from 0.3.25 through 1.10.0; versions of the npm package mammoth from 0.3.25 through 1.10.0; versions of the NuGet package mammoth through 1.10.0; versions of the java package "org.zwobble.mammoth:mammoth" through 1.10.0, are vulnerable to Directory Traversal due to the lack of path or file type validation when processing a docx file containing an image with an external link (r:link attribute instead of embedded r:embed). The library resolves the URI to a file path and after reading, the content is encoded as base64 and included in the HTML output as a data URI. An attacker can read arbitrary files on the system where the conversion is performed or cause an excessive resources consumption by crafting a docx file that links to special device files such as /dev/random or /dev/zero.

  • LOW
  • NETWORK
  • NONE
  • CHANGED
  • REQUIRED
  • NONE
  • HIGH
  • HIGH

CWE-22 - Path Traversal

Path traversal (or directory traversal), is a vulnerability that allows malicious users to traverse the server's root directory, gaining access to arbitrary files and folders such as application code & data, back-end credentials, and sensitive operating system files. In the worst-case scenario, an attacker could potentially execute arbitrary files on the server, resulting in a denial of service attack. Such an exploit may severely impact the integrity, confidentiality, and availability of an application.

Advisory Timeline

  • Published