همهٔ گزارش‌ها
کم

Improper Control of Generation of Code ('Code Injection') in mdx-mermaid

متن اصلی

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

نسخه‌های متأثر
= 2.0.0-rc1
نسخهٔ اصلاح‌شده
2.0.0-rc2
نسخه‌های متأثر
< 1.3.0
نسخهٔ اصلاح‌شده
1.3.0

بهره‌برداری

CVE-2022-36036

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

FIRST EPSS · ۱۴۰۵/۰۸/۳۰

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

Impact

Arbitary javascript injection

Modify any mermaid code blocks with the following code and the code inside will execute when the component is loaded by MDXjs

` + (function () {
  // Put Javascript code here
  return ''
}()) + `

The block below shows a valid mermaid code block

```mermaid
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
```

The same block but with the exploit added

```mermaid
` + (function () {
  alert('vulnerable')
  return ''
}()) + `
graph TD;
    A-->B;
    A-->C;
    B-->D;
    C-->D;
```
Patches

1.3.0 and 2.0.0-rc2

Workarounds

None known

پیوندها

گزارش‌دهندگان

  • sjwall