# CVE-2021-23631: Directory Traversal

- Severity: High 7.5 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.04%, higher than 81% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 4 links below, marked "exploit"
- Published: 2022-01-21T20:05:23.621Z
- Modified: 2026-06-17T03:38:50.747Z
- Also known as: GHSA-jv7g-9g6q-cxvw
- Weaknesses: CWE-22
- Assigned by: snyk

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

(As written by CVE List.)

## Affected

- convert-svg-core: before unspecified
- convert-svg-to-png: before unspecified
- convert-svg-to-jpeg: before unspecified
- convert-svg-core (npm): up to 0.5.0
- convert-svg-to-png (npm): up to 0.5.0
- convert-svg-to-jpeg (npm): up to 0.5.0
- convert-svg-core_project convert-svg-core: no versions given

## Every score

- snyk: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N/E:P`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:P/I:N/A:N`

## References

- <https://snyk.io/vuln/SNYK-JS-CONVERTSVGCORE-1582785> (exploit, third-party-advisory, web)
- <https://snyk.io/vuln/SNYK-JS-CONVERTSVGTOPNG-2348244> (exploit, third-party-advisory, web)
- <https://snyk.io/vuln/SNYK-JS-CONVERTSVGTOJPEG-2348245> (exploit, third-party-advisory, web)
- <https://gist.github.com/legndery/a248350bb25b8502a03c2f407cedeb14> (exploit, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23631> (advisory)
- <https://github.com/neocotic/convert-svg> (package)

## Sources

- CVE List: [CVE-2021-23631](https://www.cve.org/CVERecord?id=CVE-2021-23631), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-jv7g-9g6q-cxvw](https://github.com/advisories/GHSA-jv7g-9g6q-cxvw), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-23631](https://nvd.nist.gov/vuln/detail/CVE-2021-23631), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23631 · Whole record: https://cve.day/CVE-2021-23631.json · Rebuilt by cve.day 2026-11-25T22:58:06.618Z
