Miggo Logo

CVE-2021-32649: October/System authenticated file write leads to remote code execution

8.8

CVSS Score
3.1

Basic Information

EPSS Score
0.62611%
Published
1/14/2022
Updated
1/30/2023
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
october/systemcomposer>= 1.1.0, < 1.1.61.1.6
october/systemcomposer< 1.0.4731.0.473

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key issues: (1) The import handlers (index_onLoadImportForm and index_onImport) in Themes.php allowed template imports without safe mode validation, enabling attackers to inject malicious Twig code. (2) The Twig SecurityPolicy's blockedMethods list (in SecurityPolicy.php) initially excluded the 'write' method, allowing attackers to call it via Twig templates. While the SecurityPolicy's configuration (blockedMethods array) is critical, it is a class property rather than a function. The primary exploitable entry points are the import functions, which directly enabled template injection. The 'write' method (in Halcyon models) was dangerous when called via Twig, but its vulnerability depends on the SecurityPolicy's missing block, not the method itself.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t *ssumin* *n *tt**k*r wit* "*r**t*, mo*i*y *n* **l*t* w**sit* p***s" privil***s in t** ***k*n* is **l* to *x**ut* P*P *o** *y runnin* sp**i*lly *r**t** Twi* *o** in t** t*mpl*t* m*rkup. ### P*t***s Issu* **s ***n p*t**** in *uil* *** *n*

Reasoning

T** vuln*r**ility st*ms *rom two k*y issu*s: (*) T** import **n*l*rs (in**x_onLo**Import*orm *n* in**x_onImport) in T**m*s.p*p *llow** t*mpl*t* imports wit*out s*** mo** v*li**tion, *n**lin* *tt**k*rs to inj**t m*li*ious Twi* *o**. (*) T** Twi* S**ur