Miggo Logo

CVE-2022-31173: Juniper is vulnerable to @DOS GraphQL Nested Fragments overflow

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.30053%
Published
7/29/2022
Updated
7/24/2023
KEV Status
No
Technology
TechnologyRust

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
juniperrust< 0.15.100.15.10

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from recursive graph traversal implementations in validation rules that used stack-based recursion without depth limits. The commit diff shows replacements of recursive calls with heap-allocated stacks (Vec-based iteration), indicating the original functions were vulnerable to unbounded recursion. Key files modified include no_fragment_cycles.rs where the cycle detection was reimplemented to avoid recursion, and similar patterns in other validation rules. The POC demonstrates that ~7500 nested fragments cause crashes, matching typical stack size limitations in Rust.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### *r*p*QL ****viour N*st** *r**m*nt in *r*p*QL mi**t ** quit* **r* to **n*l* **p*n*in* on t** impl*m*nt*tion l*n*u***. Som* l*n*u*** support n*tiv*ly * m*x r**ursion **pt*. *ow*v*r, on most *ompil** l*n*u***s, you s*oul* *** * t*r*s*ol* o* r**ursi

Reasoning

T** vuln*r**ility st*ms *rom r**ursiv* *r*p* tr*v*rs*l impl*m*nt*tions in v*li**tion rul*s t**t us** st**k-**s** r**ursion wit*out **pt* limits. T** *ommit *i** s*ows r*pl***m*nts o* r**ursiv* **lls wit* ***p-*llo**t** st**ks (V**-**s** it*r*tion), i