CVE-2020-11887: XSS in svg2png (NPM package)

svg2png Updated 02 Oct 2025

Summary

06/01/2022
No i
Moderate
6.1

CVE-2020-11887: XSS in svg2png (NPM package). Affects svg2png versions < 4.1.1. 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

svg2png is an NPM package that allows converting SVG (Scalable Vector Graphics) images to PNG (Portable Network Graphics) format. It provides a convenient way to generate PNG images from SVG documents. However, version 4.1.1 of svg2png is vulnerable to a cross-site scripting (XSS) attack, which can lead to server-side request forgery (SSRF) by injecting malicious JavaScript code into an SVG document.

Vulnerability Detail

The XSS vulnerability in svg2png version 4.1.1 allows an attacker to execute arbitrary JavaScript code within an SVG document. This can be exploited to perform SSRF attacks, where the attacker can make requests to internal resources or external systems on behalf of the server. The vulnerability has a CVSS score of 6.1, indicating a moderate severity level. The CWE ID associated with this vulnerability is CWE-79.

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 →

Workaround

There is no known workaround for this vulnerability. It is essential to update to a non-vulnerable version of svg2png as soon as possible.

Conclusion

svg2png version 4.1.1 is vulnerable to XSS, allowing for potential SSRF attacks. It is crucial to update to a non-vulnerable version of svg2png to mitigate this risk. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for svg2png →

Share this vulnerability

FAQ

svg2png is an NPM package that converts SVG images to PNG format.

XSS (Cross-Site Scripting) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users.

SSRF (Server-Side Request Forgery) is a vulnerability that allows attackers to make requests to internal resources or external systems on behalf of the server.

This vulnerability has a moderate severity level with a CVSS score of 6.1.

To fix this vulnerability, update svg2png to the latest non-vulnerable version by running 'npm install svg2png@latest'.

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