CVE-2020-12827: MJML vulnerable to path traversal
7.2
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.83132%
CWE
Published
5/24/2022
Updated
10/19/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:L
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| mjml | npm | < 4.6.3 | 4.6.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from insecure processing of the mj-include directive's path attribute. The GitHub patch introduces an ignoreIncludes parameter to disable this feature by default, indicating the vulnerability resided in the include-handling logic within mjml2html. The function's pre-patch behavior allowed path traversal because it did not properly sanitize or restrict file paths when resolving includes. The commit modifies mjml2html in index.js to add this safeguard, confirming this as the entry point for the vulnerable functionality.