Vulnerabilities in pkg:maven/org.zwobble.mammoth/mammoth

PACKAGE
Advisory Identifier: GHSA-rmjr-87wv-gf87
Advisory Summary

CVE-2025-11849 is a MODERATE (CVSS 9.3) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Mammoth libraries in the npm ecosystem. The issue involves mammoth is vulnerable to directory traversal. Remediation is available by upgrading affected packages to version 1.11.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.zwobble.mammoth/mammoth

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.zwobble.mammoth/mammoth. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-rmjr-87wv-gf87 CVE-2025-11849 MODERATE Mammoth is vulnerable to Directory Traversal

CVE-2025-11849 at a Glance

CVE Identifier CVE-2025-11849
GHSA Identifier GHSA-rmjr-87wv-gf87
Severity MODERATE
CVSS v3.1 Base Score 9.3
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Mammoth
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 9.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2025-11849

To remediate this vulnerability, upgrade all affected Mammoth dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mammoth fixed: 1.11.0
npm install mammoth@1.11.0
org.zwobble.mammoth:mammoth fixed: 1.11.0
<dependency>
    <groupId>org.zwobble.mammoth</groupId>
    <artifactId>mammoth</artifactId>
    <version>1.11.0</version>
</dependency>
mammoth fixed: 1.11.0
pip install mammoth>=1.11.0
Mammoth fixed: 1.11.0
Upgrade Mammoth to 1.11.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls mammoth

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-11849, inspect your project dependencies using npm:

npm ls mammoth

Analyze the terminal output to locate any version of Mammoth in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.11.0), your application is affected.

Note: The npm ls mammoth command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Mammoth, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2025-11849 Affected Mammoth Versions

4 component(s)
Fixed Versions:
1.11.0
Product / Package Ecosystem Affected Versions Fixed Version
mammoth
npm
≥ 0.3.25
< 1.11.0
1.11.0
org.zwobble.mammoth:mammoth
Maven
< 1.11.0
1.11.0
mammoth
PyPI
≥ 0.3.25
< 1.11.0
1.11.0
Mammoth
NuGet
< 1.11.0
1.11.0

References

Frequently Asked Questions

What is CVE-2025-11849?
CVE-2025-11849 is a security vulnerability in Mammoth involving Mammoth is vulnerable to Directory Traversal under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Mammoth versions are affected?
Affected versions include releases prior to 1.11.0 across affected packages: mammoth, org.zwobble.mammoth:mammoth, Mammoth.
What version fixes CVE-2025-11849?
Upgrading to 1.11.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mammoth affected?
Yes, mammoth is affected in releases prior to 1.11.0. Upgrade your dependency to 1.11.0 or later.
Is Mammoth affected?
Yes, Mammoth is affected in releases prior to 1.11.0. Upgrade your dependency to 1.11.0 or later.
What is the CVSS score of CVE-2025-11849?
CVE-2025-11849 has a CVSS v3.1 base score of 9.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:H.
What CWE is associated with CVE-2025-11849?
CVE-2025-11849 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check npm dependencies for CVE-2025-11849?
Run the dependency tree command: 'npm ls mammoth'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rmjr-87wv-gf87",
  "modified" : "2025-10-17T17:50:00Z",
  "published" : "2025-10-17T06:31:11Z",
  "aliases" : [ "CVE-2025-11849" ],
  "summary" : "Mammoth is vulnerable to Directory Traversal",
  "details" : "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS: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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "mammoth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.3.25"
      }, {
        "fixed" : "1.11.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.zwobble.mammoth:mammoth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.11.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "mammoth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.3.25"
      }, {
        "fixed" : "1.11.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Mammoth"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.11.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-11849"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mwilliamson/mammoth.js/commit/c54aaeb43a7941317c1f3c119ffa92090f988820"
  }, {
    "type" : "WEB",
    "url" : "https://gist.github.com/AudunWA/4d690d9ae5efdafe7cf71d9c2ee90a10"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mwilliamson/java-mammoth"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-DOTNET-MAMMOTH-13561968"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-JAVA-ORGZWOBBLEMAMMOTH-13561969"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-JS-MAMMOTH-13554470"
  }, {
    "type" : "WEB",
    "url" : "https://security.snyk.io/vuln/SNYK-PYTHON-MAMMOTH-13561967"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-10-17T17:50:00Z",
    "nvd_published_at" : "2025-10-17T05:15:33Z"
  }
}