CVE-2020-27428: Cross-site Scripting in Scratch-Svg-Renderer

scratch-svg-renderer Updated 02 Oct 2025

Summary

08/01/2022
No i
Moderate
Not published

CVE-2020-27428: Cross-site Scripting in Scratch-Svg-Renderer. Affects scratch-svg-renderer versions < 0.2.0. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Scratch-Svg-Renderer is an npm package that provides a rendering engine for Scratch projects in SVG format. It allows users to create interactive animations and games. However, version 0.2.0 of Scratch-Svg-Renderer is vulnerable to a DOM-based cross-site scripting (XSS) attack. This vulnerability enables attackers to execute arbitrary web scripts or HTML by exploiting a flaw in the handling of crafted sb3 files.

Vulnerability Detail

The DOM-based XSS vulnerability in Scratch-Svg-Renderer v0.2.0 arises from inadequate input sanitization. When processing a specially crafted sb3 file, the renderer fails to properly validate and sanitize user-supplied data, allowing malicious scripts or HTML code to be executed within the context of the user's browser. This can lead to various security risks, including session hijacking, data theft, and unauthorized actions on behalf of the user.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Conclusion

The DOM-based XSS vulnerability in Scratch-Svg-Renderer v0.2.0 poses a moderate security risk, allowing attackers to execute arbitrary scripts or HTML code within the user's browser. To mitigate this risk, it is recommended to update to a non-vulnerable version of the package and follow secure coding practices. For further assistance with vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for scratch-svg-renderer →

Share this vulnerability

FAQ

Scratch-Svg-Renderer is an npm package that provides a rendering engine for Scratch projects in SVG format. It allows users to create interactive animations and games.

DOM-based XSS is a type of cross-site scripting vulnerability that occurs when client-side scripts manipulate the Document Object Model (DOM) of a web page. In this case, the vulnerability in Scratch-Svg-Renderer allows attackers to inject malicious scripts or HTML code into the DOM, leading to potential security risks.

An attacker can exploit this vulnerability by crafting a malicious sb3 file and tricking a user into opening it with a vulnerable version of Scratch-Svg-Renderer. When the file is processed, the malicious code is executed within the user's browser, potentially compromising their session, stealing sensitive data, or performing unauthorized actions.

Yes, the maintainers of Scratch-Svg-Renderer have released a patch to address this vulnerability. Users are advised to update their dependencies to a version higher than 0.2.0 to mitigate the risk.

To ensure the security of your web application, it is important to follow secure coding practices, including input validation and output encoding. Regularly updating dependencies to the latest non-vulnerable versions is also crucial. Additionally, implementing a web application firewall (WAF) and conducting regular security audits can help identify and mitigate potential vulnerabilities.

Related vulnerabilities

Recent vulnerabilities recorded for scratch-svg-renderer.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback