Skip to main content

mammoth.js CVE-2026-97151

| EUVDEUVD-2026-85782 HIGH
Improperly Controlled Modification of Object Prototype Attributes (Prototype Pollution) (CWE-1321)
2026-09-24 mitre GHSA-89qm-22qm-xf5h
8.4
CVSS 4.0 · Vendor: mitre
View

Attack ChainAIDerived

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

  1. Access
    Craft .docx with __proto__ style type
  2. Delivery
    Upload to document-conversion service
  3. Exploit
    Pollute Object.prototype (externalFileAccess=true)
  4. Execution
    Submit follow-up doc referencing local files
  5. Impact
    Disclose file contents in returned HTML

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V3 - Web Frontend Security Prototype pollution prevention
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

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

Exploitation Conditions

The prototype-pollution primitive (all versions before 1.12.2) requires only that the application convert an attacker-supplied .docx containing a style element with w:type set to '__proto__' - no authentication or user interaction on the victim side. The escalated local-file-disclosure impact adds three concrete prerequisites: (1) the installed version is in the range 1.11.0 through 1.12.1; (2) the application converts additional documents within the SAME Node.js process after the polluting document, so the polluted Object.prototype persists; and (3) the application returns the converted HTML back to the party that supplied the documents, so the leaked file contents are observable. Deployments on <1.11.0 or that spawn a fresh process per conversion, or that do not return HTML to the uploader, are limited to the pollution/DoS impact rather than file disclosure.

Impact

The vendor CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:H, 8.4 High) marks this as network-reachable and unauthenticated, but the AT:P (attack requirements present) metric is the key qualifier: the high-confidentiality outcome (local file disclosure) is not universal - it requires versions 1.11.0-1.12.1 specifically AND an application architecture that converts multiple documents in the same long-lived process and returns the rendered HTML to the document supplier. The prototype-pollution primitive itself (all versions before 1.12.2) is broadly reachable whenever untrusted .docx files are converted, but its direct impact is polluting Object.prototype (integrity/availability), not automatic file theft. No EPSS score was provided, and there is no CISA KEV listing and no public exploit code identified at time of analysis - only a vendor unit test demonstrating the pollution. This is a genuine, patch-worthy issue for services that ingest user-supplied Office documents, but the headline 8.4 overstates the typical case: the confidentiality-breach path is conditional on a specific vulnerable-version window and a specific reuse-in-process deployment pattern. Prioritize where mammoth.js processes untrusted uploads; deprioritize where it converts only trusted, first-party documents.

Exploit ScenarioDerived

An attacker uploads a maliciously crafted .docx to a web service that uses mammoth.js to convert documents to HTML (e.g., a resume portal, help-desk attachment viewer, or document-preview feature). The document defines a style whose w:type is '__proto__', polluting Object.prototype so that externalFileAccess becomes true for subsequent conversions in the same Node.js process; a follow-up document then references local server files whose contents are reflected back in the returned HTML. No public exploit code exists, but the vendor's own regression test confirms the pollution primitive is trivially triggerable.

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 – Sep 24, 2026

Converting an attacker-supplied .docx file with mammoth.js before 1.12.2 allows unauthenticated remote attackers to inject arbitrary properties into Object.prototype via the document's style definitions (CWE-1321 prototype pollution). In versions 1.11.0 through 1.12.1 the pollution can additionally be leveraged to read local server files and disclose them to the document supplier, but only where the application converts further documents in the same long-lived Node.js process and returns the converted HTML back to that party. There is no confirmed active exploitation (not in CISA KEV) and no public exploit code identified at time of analysis; vendor-released patch: 1.12.2.

RemediationAI

Upgrade to mammoth.js 1.12.2 (npm install mammoth@1.12.2), which replaces the vulnerable style-type object lookup with an explicit switch statement and blocks the "__proto__" key path entirely; the fix is documented in the project NEWS file (referenced from the advisory at https://raw.githubusercontent.com/mwilliamson/mammoth.js/master/NEWS) and in upstream commits 31f0c370be4b95ac4fa285fea3be970606735f16 and 2888fa158d67c1419199f152326e12a05618b53e. If upgrading is not immediately possible, the highest-value compensating control is to keep externalFileAccess disabled and not configurable per-request, since the file-disclosure outcome depends on that flag being reachable through the polluted prototype - the trade-off is that any feature relying on external file references stops working. Additional measures: never convert multiple untrusted documents in the same long-lived process (spawn a fresh worker/process per conversion so a polluted prototype cannot persist - at the cost of increased CPU/latency), and avoid returning converted HTML from untrusted documents back to the party that supplied them (which removes the exfiltration channel but may break legitimate upload-preview workflows). Running Node.js with --disable-proto=throw or freezing Object.prototype at startup blocks the primitive, with the trade-off that libraries which legitimately mutate prototypes may break. As defense in depth, reject or sanitize .docx style elements whose w:type is not one of the four recognized values before conversion, and monitor for unexpected local file paths appearing in rendered output.

Affected VersionsENISA

mammoth.js 0 <1.12.2

Affected Packages

euvd mammoth_js fix: 1.12.2

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 for converting .docx (Office Open XML) documents to HTML and other formats. Its styles reader (lib/docx/styles-reader.js) parsed w:style elements from the document's styles XML and used the attacker-controlled w:type attribute as a key into a plain JavaScript object literal mapping style types ("paragraph", "character", "table", "numbering") to per-type style collections. Because that map was an ordinary object with Object.prototype in its chain, a crafted w:type value of "__proto__" resolved to Object.prototype, so subsequent property writes landed on the global prototype rather than on a private collection - the classic CWE-1321 prototype pollution root cause. Beyond direct integrity/availability effects on the host process, the pollution enables an impact escalation in 1.11.0-1.12.1: an application option named externalFileAccess (read from an options object) could itself be set to true through the polluted prototype, causing externally referenced content to be resolved from the server's local filesystem. The upstream fix in 1.12.2 replaces the object-literal lookup with an explicit switch statement over the four known style types (unrecognized types are ignored) and adds a regression test asserting that a w:type of "__proto__" does not cause pollution.

Know when Prototype Pollution 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 (mitre) PRIMARY 8.4 HIGH
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:L/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.0 HIGH

Unauthenticated crafted-doc supply (PR:N/UI:N); AC:H because the high-impact file disclosure needs the 1.11.0-1.12.1 window plus same-process reuse and HTML return; C:H for local file read, I:L/A:L from prototype pollution.

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

Primary rating from Vendor (mitre).

CVSS VectorVendor: mitre

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

DescriptionCVE.org

mammoth (aka mammoth.js) before 1.12.2 is vulnerable to prototype pollution when reading the styles defined in a document. Converting a crafted .docx file allows an attacker to add arbitrary properties to Object.prototype. In 1.11.0 through 1.12.1, applications that convert further documents in the same process and return the converted HTML can also disclose the contents of local server files (to the party supplying the documents) by setting externalFileAccess to true.

Executive ViewAI

Why It Matters

Organizations using mammoth.js to convert untrusted .docx files are exposed to a high-severity vulnerability that can let unauthenticated attackers alter application behavior and, in versions 1.11.0 through 1.12.1, access sensitive server files under specific long-lived Node.js conditions. There is no public exploit identified at time of analysis, but the flaw affects any service running mammoth.js before 1.12.2 and returning converted HTML to the document supplier. Leadership should prioritize patching because a crafted document could lead to data exposure or service disruption without authentication, affecting customers, employees, or internal operations that rely on document conversion.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 73% exploitable
Prevalence
Medium
widely-used npm docx-to-HTML conversion library, common but purpose-specific
Social Media
1
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
No
Human Impact
High
Technical Impact
Partial

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2026-34621 HIGH POC
8.6 Apr 11

Prototype pollution in Adobe Acrobat Reader versions 24.001.30356, 26.001.21367 and earlier enables arbitrary code execu

CVE-2021-23450 CRITICAL POC
9.8 Dec 17

All versions of package dojo are vulnerable to Prototype Pollution via the setObject function. Rated critical severity (

CVE-2024-56059 CRITICAL
9.8 Dec 18

Prototype pollution in the farinspace Partners WordPress plugin (versions up to and including 0.2.0) enables remote unau

CVE-2021-23383 CRITICAL POC
9.8 May 04

The package handlebars before 4.7.7 are vulnerable to Prototype Pollution when selecting certain compiling options to co

CVE-2020-7788 CRITICAL POC
9.8 Dec 11

This affects the package ini before 1.3.6. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitabl

CVE-2020-28271 CRITICAL POC
9.8 Nov 12

Prototype pollution vulnerability in 'deephas' versions 1.0.0 through 1.0.5 allows attacker to cause a denial of service

CVE-2023-38894 CRITICAL POC
9.8 Aug 16

A Prototype Pollution issue in Cronvel Tree-kit v.0.7.4 and before allows a remote attacker to execute arbitrary code vi

CVE-2024-24292 CRITICAL POC
9.8 Mar 28

A Prototype Pollution issue in Aliconnect /sdk v.0.0.6 allows an attacker to execute arbitrary code via the aim function

CVE-2023-26121 CRITICAL POC
10.0 Apr 11

All versions of the package safe-eval are vulnerable to Prototype Pollution via the safeEval function, due to improper s

CVE-2021-23449 CRITICAL POC
10.0 Oct 18

This affects the package vm2 before 3.9.4 via a Prototype Pollution attack vector, which can lead to execution of arbitr

CVE-2024-39011 CRITICAL POC
9.8 Jul 30

Prototype Pollution in chargeover redoc v2.0.9-rc.69 allows attackers to execute arbitrary code or cause a Denial of Ser

CVE-2024-38988 CRITICAL POC
9.8 Mar 28

alizeait unflatto <= 1.0.2 was discovered to contain a prototype pollution via the method exports.unflatto at /dist/inde

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