Miggo Logo

CVE-2023-34251: Grav Server Side Template Injection (SSTI) vulnerability

9.1

CVSS Score
3.1

Basic Information

EPSS Score
0.85906%
Published
6/16/2023
Updated
11/5/2023
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
getgrav/gravcomposer< 1.7.421.7.42

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from improper validation of user-controlled input in Twig filter/function handlers. The affected functions (map, filter, reduce) accepted string arguments representing PHP functions without checking against dangerous functions via Utils::isDangerousFunction(). This allowed attackers to pass system-level commands through template injection. The commit 244758d explicitly adds security checks to these functions, confirming their role in the vulnerability.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Summ*ry I *oun* *n R**(R*mot* *o** *x**ution) *y SSTI in t** **min s*r**n. ### **t*ils R*mot* *o** *x**ution is possi*l* *y *m****in* m*li*ious P*P *o** on t** **ministr*tor s*r**n *y * us*r wit* p*** **itin* privil***s. ### Po* *. Lo* in to t*

Reasoning

T** vuln*r**ility st*ms *rom improp*r v*li**tion o* us*r-*ontroll** input in Twi* *ilt*r/*un*tion **n*l*rs. T** *****t** *un*tions (`m*p`, `*ilt*r`, `r**u**`) ****pt** strin* *r*um*nts r*pr*s*ntin* `P*P` *un*tions wit*out ****kin* ***inst **n**rous *