CVE-2025-11849
JSON

6.4medium

Mammoth is vulnerable to Directory Traversal

Severity
6.4medium CVSS:4.0 by snyk
Exploit likelihood
1.13% (higher than 67% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-rmjr-87wv-gf87PYSEC-2026-1603

Description

Versions of the package mammoth from 0.3.25 and before 1.11.0; versions of the package mammoth from 0.3.25 and before 1.11.0; versions of the package mammoth before 1.11.0; versions of the package org.zwobble.mammoth:mammoth before 1.11.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.

Affected

Product or packageVersionsReported by
mammothfrom 0.3.25 before 1.11.0, before 1.11.0CVE List
org.zwobble.mammoth:mammothbefore 1.11.0CVE List
mammoth (npm)from 0.3.25 before 1.11.0GitHub Advisory Database
org.zwobble.mammoth:mammoth (Maven)before 1.11.0GitHub Advisory Database
mammoth (PyPI)from 0.3.25 before 1.11.0GitHub Advisory Database, PyPA Advisory Database
Mammoth (NuGet)before 1.11.0GitHub Advisory Database

All scores

snyk6.4medium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:N/SA:H/E:P
snyk9.3critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:H/E:P
GitHub9.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:H
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:N/SA:H/E:P
PyPA Advisory Database9.3critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:H
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:H/SI:N/SA:H/E:P

Classification

CWE-22

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

What each source says

CVE List

Versions of the package mammoth from 0.3.25 and before 1.11.0; versions of the package mammoth from 0.3.25 and before 1.11.0; versions of the package mammoth before 1.11.0; versions of the package org.zwobble.mammoth:mammoth before 1.11.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.

NVD (es)

Versiones del paquete mammoth desde 0.3.25 y anteriores a 1.11.0; versiones del paquete mammoth desde 0.3.25 y anteriores a 1.11.0; versiones del paquete mammoth anteriores a 1.11.0; versiones del paquete org.zwobble.mammoth:mammoth anteriores a 1.11.0 son vulnerables a salto de directorio debido a la falta de validación de ruta o tipo de archivo al procesar un archivo docx que contiene una imagen con un enlace externo (atributo r:link en lugar de r:embed incrustado). La biblioteca resuelve la URI a una ruta de archivo y después de la lectura, el contenido se codifica como base64 y se incluye en la salida HTML como una URI de datos. Un atacante puede leer archivos arbitrarios en el sistema donde se realiza la conversión o causar un consumo excesivo de recursos al crear un archivo docx que enlaza a archivos de dispositivo especiales como /dev/random o /dev/zero.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-11849 changed 2025-10-17CVE Terms of Use
GitHub Advisory DatabaseGHSA-rmjr-87wv-gf87 changed 2026-07-07CC-BY-4.0
NVDCVE-2025-11849 changed 2026-10-19Public domain
PyPA Advisory DatabasePYSEC-2026-1603 changed 2026-07-07CC-BY-4.0