Miggo Logo

CVE-2020-12827: MJML vulnerable to path traversal

7.2

CVSS Score
3.1

Basic Information

EPSS Score
0.83132%
Published
5/24/2022
Updated
10/19/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
mjmlnpm< 4.6.34.6.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

MJML prior to *.*.* *ont*ins * p*t* tr*v*rs*l vuln*r**ility w**n pro**ssin* t** `mj-in*lu**` *ir**tiv* wit*in *n MJML *o*um*nt.

Reasoning

T** vuln*r**ility st*ms *rom ins**ur* pro**ssin* o* t** `mj-in*lu**` *ir**tiv*'s `p*t*` *ttri*ut*. T** *it*u* p*t** intro*u**s *n `i*nor*In*lu**s` p*r*m*t*r to *is**l* t*is ***tur* *y ****ult, in*i**tin* t** vuln*r**ility r*si*** in t** in*lu**-**n*l