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.
PUBLISHED5.2CWE-1333
Mammoth.js 1.3.0 before 1.12.3 ReDoS via Style Map Tokeniser
Problem type
Affected products
mwilliamson
mammoth.js
< 1.12.3 - AFFECTED
References
GitHub Issue #487
https://github.com/mwilliamson/mammoth.js/issues/487
github.com
https://github.com/mwilliamson/mammoth.js/commit/dc49225425c2c07de0a6dc3529f2386c82a032b4
github.com
https://github.com/mwilliamson/mammoth.js/blob/1.12.2/lib/styles/parser/tokeniser.js#L6-L30
github.com
https://github.com/mwilliamson/mammoth.js
VulnCheck Advisory: Mammoth.js 1.3.0 before 1.12.3 ReDoS via Style Map Tokeniser
https://www.vulncheck.com/advisories/mammoth-js-1.3.0-before-1.12.3-redos-via-style-map-tokeniser
JSON source
https://cveawg.mitre.org/api/cve/CVE-2026-105219Click to expand
{
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"cveMetadata": {
"cveId": "CVE-2026-105219",
"assignerOrgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
"assignerShortName": "VulnCheck",
"dateUpdated": "2026-10-04T17:09:54.186Z",
"dateReserved": "2026-10-04T13:04:00.479Z",
"datePublished": "2026-10-04T17:09:54.186Z",
"state": "PUBLISHED"
},
"containers": {
"cna": {
"providerMetadata": {
"orgId": "83251b91-4cc7-4094-a5c7-464a1b83ea10",
"shortName": "VulnCheck",
"dateUpdated": "2026-10-04T17:09:54.186Z"
},
"datePublic": "2026-09-01T00:00:00.000Z",
"title": "Mammoth.js 1.3.0 before 1.12.3 ReDoS via Style Map Tokeniser",
"descriptions": [
{
"lang": "en",
"value": "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."
}
],
"affected": [
{
"vendor": "mwilliamson",
"product": "mammoth.js",
"defaultStatus": "unaffected",
"versions": [
{
"version": "1.3.0",
"status": "affected",
"versionType": "semver",
"lessThan": "1.12.3"
}
]
}
],
"problemTypes": [
{
"descriptions": [
{
"lang": "en",
"description": "Inefficient Regular Expression Complexity",
"cweId": "CWE-1333",
"type": "CWE"
}
]
}
],
"references": [
{
"url": "https://github.com/mwilliamson/mammoth.js/issues/487",
"name": "GitHub Issue #487",
"tags": [
"issue-tracking"
]
},
{
"url": "https://github.com/mwilliamson/mammoth.js/commit/dc49225425c2c07de0a6dc3529f2386c82a032b4",
"tags": [
"patch"
]
},
{
"url": "https://github.com/mwilliamson/mammoth.js/blob/1.12.2/lib/styles/parser/tokeniser.js#L6-L30",
"tags": [
"technical-description"
]
},
{
"url": "https://github.com/mwilliamson/mammoth.js",
"tags": [
"product"
]
},
{
"url": "https://www.vulncheck.com/advisories/mammoth-js-1.3.0-before-1.12.3-redos-via-style-map-tokeniser",
"name": "VulnCheck Advisory: Mammoth.js 1.3.0 before 1.12.3 ReDoS via Style Map Tokeniser",
"tags": [
"third-party-advisory"
]
}
],
"metrics": [
{
"format": "CVSS"
},
{
"format": "CVSS",
"cvssV3_1": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "NONE",
"integrityImpact": "NONE",
"availabilityImpact": "HIGH",
"baseScore": 7.5,
"baseSeverity": "HIGH"
}
}
],
"credits": [
{
"lang": "en",
"value": "Siyang Wu",
"type": "finder"
}
]
}
}
}