CVE-2020-7750 Cross-site Scripting (XSS)
An attacker can inject arbitrary elements into the DOM via improper SVG escaping in the scratch-svg-renderer library, potentially leading to code execution.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2020-7750?
CVE-2020-7750 is a critical cross-site scripting vulnerability in scratch-svg-renderer, published on 21 Oct 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
This affects the package scratch-svg-renderer before 0.2.0-prerelease.20201019174008. The loadString function does not escape SVG properly, which can be used to inject arbitrary elements into the DOM via the _transformMeasurements function.
Weakness: CWE-79
Which versions are affected by CVE-2020-7750?
2 open source packages ship an affected version, including scratch-svg-renderer. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
scratch-svg-renderer npm | All versions | 0.2.0-prerelease.20201019174008 |
scratch-svg-renderer npm | All versions | 0.2.0-prerelease.20201019174008 |
Products include Mit Scratch-Svg-Renderer.
How do I fix CVE-2020-7750?
Upgrade scratch-svg-renderer to 0.2.0-prerelease.20201019174008 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2020-7750 being exploited?
There is no known exploitation of CVE-2020-7750 in the wild and no public exploit code.
Public exploit code: 1 Exploit-DB entry.
Other vulnerabilities in scratch-svg-renderer
Sources
Also known as GHSA-j977-g5vj-j27g, SNYK-JS-SCRATCHSVGRENDERER-1020497.