Miggo Logo

CVE-2023-25157: GeoServer OGC Filter SQL Injection Vulnerabilities

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.9985%
Published
2/22/2023
Updated
2/22/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.geoserver.community:gs-jdbcconfigmaven< 2.21.42.21.4
org.geoserver.community:gs-jdbcconfigmaven>= 2.22.0, < 2.22.22.22.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from two primary issues: 1) Direct string concatenation in OGC filter handling (particularly PropertyIsLike) without parameterization, visible in the FilterToCatalogSQL.java diff where LIKE patterns were moved to parameterized queries. 2) Unsafe comment generation in debug mode, addressed by the escapeComment() method in Dialect.java. The commit shows these functions were modified to add parameter binding and comment escaping, confirming their vulnerable prior state.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Imp**t **oS*rv*r in*lu**s support *or t** O** *ilt*r *xpr*ssion l*n*u*** *n* t** O** *ommon Qu*ry L*n*u*** (*QL) *s p*rt o* t** W** ***tur* S*rvi** (W*S) *n* W** M*p S*rvi** (WMS) proto*ols. *QL is *lso support** t*rou** t** W** *ov*r*** S*rvi*

Reasoning

T** vuln*r**ility st*mm** *rom two prim*ry issu*s: *) *ir**t strin* *on**t*n*tion in O** *ilt*r **n*lin* (p*rti*ul*rly Prop*rtyIsLik*) wit*out p*r*m*t*riz*tion, visi*l* in t** `*ilt*rTo**t*lo*SQL.j*v*` *i** w**r* LIK* p*tt*rns w*r* mov** to p*r*m*t*r