# CVE-2021-23352: Command Injection

- Severity: High 8.6 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L/E:F/RL:O/RC:C`
- 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.06%, higher than 81% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-03-09T18:30:23.064Z
- Modified: 2026-07-08T06:50:04.197Z
- Also known as: GHSA-753c-phhg-cj29, SNYK-JS-MADGE-1082875
- Weaknesses: CWE-77, CWE-89
- Assigned by: snyk

## Description

This affects the package madge before 4.0.1. It is possible to specify a custom Graphviz path via the graphVizPath option parameter which when the .image(), .svg() or .dot() functions are called, is executed by the childprocess.exec function.

(As written by CVE List.)

## Affected

- madge: from unspecified before 4.0.1
- madge (npm): before 4.0.1
- madge_project madge: before 4.0.1

## Every score

- snyk: CVSS:3.1 8.6 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L/E:F/RL:O/RC:C`
- GitHub: rating High
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 7.5 High `AV:N/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://snyk.io/vuln/SNYK-JS-MADGE-1082875> (exploit, patch, third-party-advisory, web)
- <https://github.com/pahen/madge/blob/master/lib/graph.js%23L27> (broken-link, third-party-advisory)
- <https://github.com/pahen/madge/commit/da5cbc9ab30372d687fa7c324b22af7ffa5c6332> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23352> (advisory)
- <https://github.com/pahen/madge/blob/master/lib/graph.js#L27> (web)

## Sources

- CVE List: [CVE-2021-23352](https://www.cve.org/CVERecord?id=CVE-2021-23352), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-753c-phhg-cj29](https://github.com/advisories/GHSA-753c-phhg-cj29), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-23352](https://nvd.nist.gov/vuln/detail/CVE-2021-23352), Public domain, modified 2026-06-17

---

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