Miggo Logo

CVE-2024-35621:
formwork Cross-site scripting vulnerability in Markdown fields

4.8

CVSS Score
3.1

Basic Information

EPSS Score
0.34577%
Published
5/28/2024
Updated
6/10/2024
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
getformwork/formworkcomposer< 1.13.01.13.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from unescaped HTML in Markdown processing. The key patch adds safe_mode enforcement in ParsedownExtra's constructor via setSafeMode(). In vulnerable versions (<1.13.0), this safety mechanism was missing, leaving the text() method (which converts Markdown to HTML) vulnerable to XSS. The text() method is the primary HTML generation point where script tags would be rendered without proper neutralization when safe mode isn't active.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t Us*rs wit* ****ss to t** **ministr*tion p*n*l wit* p*** **itin* p*rmissions *oul* ins*rt `<s*ript>` t**s in m*rk*own *i*l*s, w*i** *r* *xpos** on t** pu*li*ly ****ssi*l* sit* p***s, l***in* to pot*nti*l XSS inj**tions. ### P*t***s - [***

Reasoning

T** vuln*r**ility st*ms *rom un*s**p** *TML in M*rk*own pro**ssin*. T** k*y p*t** ***s s***_mo** *n*or**m*nt in `P*rs**own*xtr*`'s *onstru*tor vi* `s*tS***Mo**()`. In vuln*r**l* v*rsions (<*.**.*), t*is s***ty m****nism w*s missin*, l**vin* t** `t*xt