CVE-2020-7750: Cross-Site Scripting in scratch-svg-renderer
9.7
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.90962%
CWE
Published
11/9/2020
Updated
1/9/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
scratch-svg-renderer | npm | <= 0.2.0-prerelease.20201016121710 | 0.2.0-prerelease.20201019174008 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The commit diff shows critical changes in _transformMeasurements where DOMPurify was added to sanitize SVG content. The vulnerability description explicitly mentions improper escaping in SVG handling that occurs during measurement transformations. The pre-patch code directly cloned and appended user-controlled SVG elements, while the fix introduced sanitization at this exact location. Though loadString is mentioned in the advisory, the actual DOM injection occurs in _transformMeasurements during rendering measurements.