Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft .docx with embedded malicious style map
-
ExploitUpload to app using mammoth.js
-
ExecutionTrigger catastrophic regex backtracking in tokeniser
-
ImpactBlock 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
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
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.
Apply vendor patch.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation
A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could
FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote
Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour
Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t
Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete
Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc
An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner
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
Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi
Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin
A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond
EUVD-2026-92122
GHSA-fp33-4hh4-xjj5
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB