CVE-2022-24429: Code Injection via SVG file in convert-svg-core

convert-svg-core Updated 02 Oct 2025

Summary

11/06/2022
Yes i
High
8.6

CVE-2022-24429: Code injection via SVG file in convert-svg-core. Affects convert-svg-core versions < 0.6.3. Fixed in 0.6.3. 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

convert-svg-core is an npm package that provides functionality for converting SVG files to other formats, such as PNG. It is widely used in various applications for handling SVG files. However, versions before 0.6.3 of convert-svg-core are vulnerable to an Arbitrary Code Injection vulnerability. This vulnerability allows an attacker to inject and execute arbitrary code by providing a specially crafted SVG file. By exploiting this vulnerability, an attacker can read arbitrary files from the file system and display the file content as a converted PNG file.

Vulnerability Detail

The vulnerability in convert-svg-core arises from insufficient input validation when processing SVG files. By manipulating certain elements or attributes within the SVG file, an attacker can inject malicious code that gets executed during the conversion process. This can lead to unauthorized access to sensitive files on the server and potential remote code execution. The impact of this vulnerability is significant as it allows an attacker to execute arbitrary code with the privileges of the application or user running the convert-svg-core package.

How To Fix

Latest published version: 0.7.1 as of 23 Oct 2026

npm install convert-svg-core@0.7.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.6.3

This is the first release that contains the fix.

npm install convert-svg-core@0.6.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, it is advised to avoid using convert-svg-core for processing untrusted SVG files until the package is updated to a secure version. If SVG file conversion is necessary, consider using alternative packages or implementing strict input validation and sanitization measures to mitigate the risk of code injection.

Conclusion

The vulnerability in convert-svg-core allows for arbitrary code injection when processing SVG files. Upgrading to version 0.6.3 or later of convert-svg-core is recommended to mitigate this vulnerability. Developers should also regularly update their dependencies to stay protected against known vulnerabilities. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for convert-svg-core →

Share this vulnerability

FAQ

convert-svg-core is an npm package used for converting SVG files to other formats, such as PNG.

This vulnerability allows an attacker to execute arbitrary code and read arbitrary files from the file system, potentially leading to unauthorized access and remote code execution.

To fix this vulnerability, upgrade convert-svg-core to version 0.6.3 or later and ensure regular updates of dependencies.

As a temporary workaround, avoid using convert-svg-core for processing untrusted SVG files or implement strict input validation and sanitization measures.

There is currently no known exploit publicly available for this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for convert-svg-core.

How To Fix

Latest published version: 0.7.1 as of 23 Oct 2026

npm install convert-svg-core@0.7.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.6.3

This is the first release that contains the fix.

npm install convert-svg-core@0.6.3

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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