CVE-2022-24278: Directory Traversal in convert-svg-core

convert-svg-core Updated 02 Oct 2025

Summary

11/06/2022
Yes i
High
7.5

CVE-2022-24278: Directory traversal in convert-svg-core. Affects convert-svg-core versions < 0.6.4. Fixed in 0.6.4. 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

convert-svg-core is an npm package that provides functionality for converting SVG files. It is commonly used in web development projects to manipulate and transform SVG images. The package is vulnerable to a Directory Traversal attack due to improper sanitization of SVG tags. This vulnerability allows an attacker to access files outside of the intended directory by crafting a specially crafted SVG file.

Vulnerability Detail

The vulnerability in convert-svg-core arises from a lack of proper sanitization of SVG tags. When processing an SVG file, the package fails to adequately validate and sanitize user-supplied input, allowing an attacker to include directory traversal sequences in the SVG file. By exploiting this vulnerability, an attacker can traverse the file system and access sensitive files outside of the intended directory. This could lead to unauthorized disclosure of sensitive information or potential remote code execution.

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.4

This is the first release that contains the fix.

npm install convert-svg-core@0.6.4

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

Workaround

There is no known workaround for this vulnerability. It is essential to upgrade to the fixed version of the convert-svg-core package to mitigate the risk of a directory traversal attack.

Conclusion

The convert-svg-core package is vulnerable to a directory traversal attack due to improper sanitization of SVG tags. To mitigate this vulnerability, developers should upgrade to version 0.6.4 or later of the package and ensure proper validation and sanitization of SVG files. For further support on vulnerability remediation, contact DevNack.com.

See every vulnerability recorded for convert-svg-core →

Share this vulnerability

FAQ

convert-svg-core is an npm package used for manipulating and converting SVG files in web development projects.

A directory traversal attack is a type of vulnerability where an attacker can access files outside of the intended directory by manipulating input to include directory traversal sequences.

This vulnerability can lead to unauthorized disclosure of sensitive information or potential remote code execution if an attacker is able to access and manipulate critical files outside of the intended directory.

To fix this vulnerability, upgrade to version 0.6.4 or later of the convert-svg-core package and ensure that all SVG files are properly validated and sanitized before processing.

There is no known workaround for this vulnerability. It is crucial to upgrade to the fixed version of the convert-svg-core package.

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.4

This is the first release that contains the fix.

npm install convert-svg-core@0.6.4

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