Miggo Logo

CVE-2019-12437: Silverstripe CSRF Protection Bypass via GraphQL

8.8

CVSS Score
3.1

Basic Information

EPSS Score
0.42614%
Published
5/24/2022
Updated
2/7/2024
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
silverstripe/graphqlcomposer>= 2.0.0, < 2.0.52.0.5
silverstripe/graphqlcomposer>= 3.1.0, < 3.1.23.1.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from inadequate mutation operation detection in CSRFMiddleware. The pre-patch version used a simple regex pattern match looking for 'mutation' at the beginning of the query. This could be bypassed by placing fragments or other syntax elements before the mutation. The patch replaced this with a three-stage check (string presence, start position regex, and full AST parsing), confirming the original function's regex-based approach was insufficient. The commit diff shows the vulnerable regex check was removed from process() and replaced with isMutation(), which handles edge cases properly.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

In Silv*rStrip*/*r*p*QL prior to *.*.* *n* *.*.*, t** pr*vious *ix *or SS-****-*** *o*s not *ompl*t*ly miti**t* t** risk o* *SR* in *r*p*QL mut*tions.

Reasoning

T** vuln*r**ility st*mm** *rom in***qu*t* mut*tion op*r*tion **t**tion in *SR*Mi**l*w*r*. T** pr*-p*t** v*rsion us** * simpl* r***x p*tt*rn m*t** lookin* *or 'mut*tion' *t t** ***innin* o* t** qu*ry. T*is *oul* ** *yp*ss** *y pl**in* *r**m*nts or ot*