Miggo Logo

CVE-2021-45029:
Code injection in ShenYu

9.8

CVSS Score

Basic Information

EPSS Score
-
Published
1/28/2022
Updated
2/3/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.apache.shenyu:shenyu-commonmaven>= 2.4.0, < 2.4.22.4.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from two key unsafe code evaluation patterns: 1) Use of Groovy's Eval.me which directly executes arbitrary Groovy code, and 2) Use of Spring's SpEL parser with full evaluation context. Both were identified in the plugin condition handling logic (SpELExpressionEvaluator class) where user-controlled expressions were processed without proper sandboxing or input validation. The CVE description and mitigation PR #2576 explicitly reference these unsafe evaluation methods being patched by implementing input validation and switching to safer evaluation contexts.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*roovy *o** Inj**tion & Sp*L Inj**tion w*i** l*** to R*mot* *o** *x**ution. T*is issu* *****t** *p**** S**nYu *.*.* *n* *.*.*.

Reasoning

T** vuln*r**ility st*ms *rom two k*y uns*** *o** *v*lu*tion p*tt*rns: *) Us* o* *roovy's *v*l.m* w*i** *ir**tly *x**ut*s *r*itr*ry *roovy *o**, *n* *) Us* o* Sprin*'s Sp*L p*rs*r wit* *ull *v*lu*tion *ont*xt. *ot* w*r* i**nti*i** in t** plu*in *on*it