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-2019-10433 Vulnerability in maven package com.ztbsuper:dingding-notifications
CVE-2017-1000452 Vulnerability in npm package samlify
CVE-2020-1936 Vulnerability in maven package org.apache.ambari:ambari-web
CVE-2020-17533 Vulnerability in maven package org.apache.accumulo:accumulo-core
CVE-2023-1108 Vulnerability in maven package io.undertow:undertow-core