Skip to main content

mammoth.js EUVDEUVD-2026-92122

| CVE-2026-105219 HIGH
Inefficient Regular Expression Complexity (ReDoS) (CWE-1333)
2026-10-04 VulnCheck GHSA-fp33-4hh4-xjj5
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft .docx with embedded malicious style map
  2. Exploit
    Upload to app using mammoth.js
  3. Execution
    Trigger catastrophic regex backtracking in tokeniser
  4. Impact
    Block Node.js event loop (service-wide DoS)

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Regex complexity limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires that the application passes attacker-controlled .docx input through mammoth.js such that the malicious style map reaches the tokeniser in lib/styles/parser/tokeniser.js - specifically a style map string containing an unterminated single-quoted string made of repeated backslash escape sequences, which triggers exponential regex backtracking. The practical limiting factor is the source of the style map: exploitation is realistic when the application reads style maps embedded in untrusted documents (so the content is attacker-supplied), but is NOT reachable when style maps are static developer-provided configuration. Affected versions are 1.3.0 up to (not including) 1.12.3; upgrading to 1.12.3 resolves it. The vendor additionally recommends processing untrusted documents in a separate thread with a timeout, which bounds the blast radius even on unpatched versions.

Impact

This is a CWE-1333 regular expression denial-of-service (ReDoS) flaw in the mammoth.js style-map tokeniser. The provided CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H) scores 8.7 on availability alone - there is no confidentiality or integrity impact (VC:N/VI:N), so the only consequence is blocking the Node.js single-threaded event loop, which in a server deployment stalls all concurrent requests. No EPSS score, KEV listing, or explicit POC=YES flag was provided, so per the signals available this is 'no public exploit identified at time of analysis'; however, the fixing commit (dc49225) ships a regression test ('unterminated strings with many escape sequences do not cause excessive backtracking') and a public GitHub issue (#487) that together document the exact trigger, meaning a working trigger is effectively public even if not packaged as a weaponized exploit. Weighing the signals: raw CVSS is high (8.7) and the attack is network-reachable and unauthenticated IF the application feeds untrusted .docx files (with embedded style maps) into mammoth, but real-world priority is tempered by the availability-only impact and the fact that many integrations supply developer-controlled style maps rather than document-embedded ones. Net: a genuine but availability-limited issue - prioritize for internet-facing document-upload services, deprioritize where style maps are static/trusted. Conflict to verify: the CVSS asserts PR:N/UI:N (fully unauthenticated, no interaction), yet exploitation depends on the application accepting and auto-processing attacker-supplied documents - confirm the deployment actually exposes an untrusted .docx ingestion path before treating this as remotely triggerable.

Exploit ScenarioDerived

An attacker uploads a malicious .docx file to a web service that uses mammoth.js to convert documents to HTML. The file carries an embedded style map containing an unterminated quoted string of repeated backslash escapes; when mammoth tokenises it, the overlapping regex alternatives cause catastrophic backtracking that pins the Node.js event loop, denying service to all other users. A public GitHub issue and the vendor's regression test document the exact trigger pattern, so no novel research is needed to reproduce it.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Oct 04, 2026

Regular expression denial of service in mammoth.js 1.3.0 through 1.12.2 lets unauthenticated remote attackers stall the Node.js event loop by feeding a crafted .docx whose embedded style map contains an unterminated single-quoted string built from repeated backslash escape sequences. The flaw lives in the style-map tokeniser and triggers catastrophic regex backtracking, so any service that converts untrusted documents to HTML becomes trivially exhaustible, though exploitation is only realistic when the style map is drawn from attacker-supplied document content rather than static developer configuration. A vendor patch is available in 1.12.3; no public exploit code or confirmed active exploitation has been identified at time of analysis.

RemediationAI

Upgrade mammoth.js to 1.12.3 or later; the vendor-released fix commit dc49225425c2c07de0a6dc3529f2386c82a032b4 (https://github.com/mwilliamson/mammoth.js/commit/dc49225425c2c07de0a6dc3529f2386c82a032b4) replaces the backtracking-prone token regex with a mutually exclusive alternative and should be verified against your dependency lockfile, since transitive pins can silently hold versions between 1.3.0 and 1.12.2. Because the vendor notes that similar parsing issues may recur, run untrusted document conversion in a separate worker thread or child process with a hard timeout and memory cap so a single malicious .docx can only burn one worker rather than the main event loop - the trade-off is added process overhead and the need to handle timeout aborts gracefully in the calling application. If you cannot patch immediately, avoid passing attacker-controlled style maps into mammoth (keep style maps as static, developer-curated configuration and strip or reject the style-map part of uploaded documents before conversion), enforce request-size and document-complexity limits at the upload boundary, apply rate limiting per client, and consider disabling the document-conversion endpoint for untrusted tenants; note that these compensating controls reduce but do not eliminate the risk, since any code path that does reach the tokeniser with attacker-controlled strings can still stall the worker. Reference the upstream issue and VulnCheck advisory above for tracking.

Affected VersionsENISA

mammoth.js 1.3.0 <1.12.3

Affected Packages

euvd mammoth_js fix: 1.12.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

mammoth.js is a JavaScript library that converts .docx documents to HTML, and its style-map handling (mammoth/style-map) relies on a small hand-rolled lexer in lib/styles/parser/tokeniser.js built on the lop RegexTokeniser. The vulnerable token pattern was '((?:\\.|[^'])*) - a classic CWE-1333 overlapping-alternative construction in which one branch consumes an escaped character (\\.) while the other ([^']) is also able to consume a backslash. When the parser encounters an unterminated single-quoted string containing many \a-style escape sequences, the engine has exponentially many ways to partition the same input between the two alternatives, causing catastrophic backtracking and effectively hanging the single-threaded Node.js event loop. The upstream fix rewrites the pattern to '((?:\\(?:.|$)|[^'\\])*), making the alternatives mutually exclusive by explicitly excluding backslash and quote from the character-class branch and handling a trailing lone backslash, and the accompanying tests confirm that unterminated strings with many escape sequences now tokenise in linear time while preserving existing string/escape semantics. Version 1.12.2 of the file is referenced directly in the advisory, confirming the pre-fix code path.

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Network-reachable via untrusted document upload (AV:N), low-complexity single-shot payload (AC:L), no auth or interaction when documents are auto-processed (PR:N/UI:N), availability-only event-loop DoS so C:N/I:N/A:H.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Mammoth.js 1.3.0 before 1.12.3 contains a regular expression denial of service vulnerability in the style map tokeniser in lib/styles/parser/tokeniser.js due to overlapping regex alternatives. Attackers can supply a crafted .docx with an unterminated quoted string of repeated backslash escapes in mammoth/style-map to block the Node.js event loop.

Executive ViewAI

Why It Matters

A denial-of-service flaw in the mammoth.js document conversion library (versions 1.3.0 through 1.12.2) allows a single malformed .docx file to stall the Node.js event loop, meaning any customer-facing or internal service that converts untrusted documents to HTML can be knocked offline with minimal attacker effort. The vulnerability is in the library's style-map parser and requires no special access, so the exposure is broad wherever document ingestion is offered - upload portals, preview features, email-to-HTML pipelines and reporting services. Because the failure mode is availability rather than data exposure, the primary business risk is service outage, degraded customer experience and remediation cost rather than breach or regulatory notification.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 73% exploitable
Prevalence
Medium
popular npm docx-to-HTML conversion library, common but not infrastructure-ubiquitous
Social Media
2
Sightings
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy