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.
Remediation
References
https://github.com/pahen/madge/blob/master/lib/graph.js%23L27
https://github.com/pahen/madge/commit/da5cbc9ab30372d687fa7c324b22af7ffa5c6332
https://snyk.io/vuln/SNYK-JS-MADGE-1082875
Related Vulnerabilities
CVE-2017-1000427 Vulnerability in npm package marked
CVE-2021-44868 Vulnerability in maven package net.mingsoft:ms-mcms
CVE-2022-21653 Vulnerability in maven package org.typelevel:jawn-parser_3
CVE-2022-23496 Vulnerability in maven package nl.basjes.parse.useragent:yauaa-elasticsearch-8
CVE-2022-24794 Vulnerability in npm package express-openid-connect