Miggo Logo

CVE-2022-36364: Apache Calcite Avatica JDBC driver arbitrary code execution

8.8

CVSS Score
3.1

Basic Information

EPSS Score
0.94025%
Published
7/29/2022
Updated
1/27/2023
KEV Status
No
Technology
TechnologyJava

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
org.apache.calcite.avatica:avatica-coremaven< 1.22.01.22.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the instantiateClient function's pre-patch behavior where it: 1) Used Class.forName() on user-controlled input without interface validation 2) Directly instantiated the class via reflection using getConstructor(URL.class). The patch adds critical asSubclass(AvaticaHttpClient.class) verification and changes exception handling to prevent invalid class instantiation. The function's pre-1.22.0 implementation matches the CWE-665 (Improper Initialization) description by failing to properly validate class constraints before object creation.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

*p**** **l*it* *v*ti** J*** *riv*r *r**t*s *TTP *li*nt inst*n**s **s** on *l*ss n*m*s provi*** vi* `*ttp*li*nt_impl` *onn**tion prop*rty; *ow*v*r, t** *riv*r *o*s not v*ri*y i* t** *l*ss impl*m*nts t** *xp**t** int*r**** ***or* inst*nti*tin* it, w*i*

Reasoning

T** vuln*r**ility st*ms *rom t** `inst*nti*t**li*nt` *un*tion's pr*-p*t** ****vior w**r* it: *) Us** `*l*ss.*orN*m*()` on us*r-*ontroll** input wit*out int*r**** v*li**tion *) *ir**tly inst*nti*t** t** *l*ss vi* r**l**tion usin* `**t*onstru*tor(URL.*