CVE-2025-11849

9.3 CRITICAL

📋 TL;DR

Mammoth document conversion library versions before 1.11.0 are vulnerable to directory traversal attacks when processing DOCX files containing images with external links. Attackers can read arbitrary files on the system or cause resource exhaustion by linking to special device files. This affects all applications using vulnerable versions of mammoth.js, mammoth-java, or mammoth-dotnet.

💻 Affected Systems

Products:
  • mammoth.js
  • mammoth-java
  • mammoth-dotnet
Versions: mammoth.js: 0.3.25 to <1.11.0; mammoth-java: all versions <1.11.0; mammoth-dotnet: all versions <1.11.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: All default configurations are vulnerable. The vulnerability is triggered when processing DOCX files with externally linked images.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise via reading sensitive files like /etc/passwd, SSH keys, or configuration files, potentially leading to credential theft and lateral movement.

🟠

Likely Case

Information disclosure of sensitive files accessible to the application process, potentially including database credentials, API keys, or user data.

🟢

If Mitigated

Limited impact if application runs with minimal privileges and file system access is properly restricted.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires only a malicious DOCX file upload. Proof-of-concept is publicly available in the GitHub gist reference.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.11.0

Vendor Advisory: https://github.com/mwilliamson/mammoth.js/commit/c54aaeb43a7941317c1f3c119ffa92090f988820

Restart Required: No

Instructions:

1. Update mammoth.js: npm update mammoth
2. Update mammoth-java: Update Maven/Gradle dependency to version 1.11.0+
3. Update mammoth-dotnet: Update NuGet package to version 1.11.0+
4. Test document conversion functionality after update.

🔧 Temporary Workarounds

Input validation for DOCX files

all

Reject DOCX files containing external image links before processing

Run with restricted permissions

linux

Run the mammoth process with minimal file system access using containerization or user restrictions

docker run --read-only -v /tmp:/tmp your-app

🧯 If You Can't Patch

  • Implement strict file upload validation to reject DOCX files with external image links
  • Run mammoth in a sandboxed environment with no access to sensitive files

🔍 How to Verify

Check if Vulnerable:

Check package.json for mammoth version <1.11.0, or check Maven/NuGet dependencies for versions <1.11.0

Check Version:

npm list mammoth (for JS) or mvn dependency:tree | grep mammoth (for Java) or dotnet list package (for .NET)

Verify Fix Applied:

Confirm mammoth version is 1.11.0 or higher in package.json, pom.xml, or .csproj files

📡 Detection & Monitoring

Log Indicators:

  • Failed file reads from unusual paths
  • High memory/CPU usage during DOCX processing
  • Errors reading /dev/random or /dev/zero

Network Indicators:

  • Uploads of DOCX files followed by outbound data exfiltration

SIEM Query:

source="application.log" AND ("mammoth" OR "docx") AND ("error" OR "failed to read" OR "/dev/")

🔗 References

📤 Share & Export