CVE-2021-29059: ReDOS in IS-SVG
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.85532%
CWE
Published
12/10/2021
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
is-svg | npm | >= 2.1.0, < 4.3.0 | 4.3.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from three key elements:
- cleanEntities' entityRegex contained multiple unbounded quantifiers (\s*, \S*) that could be exploited with long whitespace/entity declarations
- removeDtdMarkupDeclarations' regex used nested quantifiers ([A-Z]+ and [^>]*) vulnerable to polynomial backtracking
- The main validation regex combined these patterns with other complex constructs. The commit patched this by replacing regex-based validation with a proper XML parser, confirming these functions were the attack surface. PoC examples specifically demonstrate exploitation of these regex patterns.