{"id":"CVE-2023-25157","published":"2023-02-21T21:00:13Z","modified":"2025-03-10T21:07:17Z","title":"Unfiltered SQL Injection Vulnerabilities in Geoserver","vendor":"geoserver","product":"geoserver","tier":"core","eol":null,"affectedVersions":[{"vendor":"geoserver","product":"geoserver","versions":[">= 2.22.0, < 2.22.2","< 2.21.4"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total","timestamp":"2025-03-10T20:59:02.658010Z","from":"CISA ADP","provenance":"source"},"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"The flaw is an SQL injection issue in GeoServer, the open source Java geospatial server, affecting how its OGC Filter and CQL expression handling is processed in the WFS and WMS protocols, and in WCS for ImageMosaic coverages. An unauthenticated remote attacker who can reach the network service can send crafted filter or query requests, with no user interaction required, to inject SQL commands that are executed against the backing data store.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T05:31:54Z"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.13048,"percentile":0.97024,"date":"2026-11-25","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2020-09-22","exploitedFirstSeen":"2020-09-22","ransomware":false,"evidence":[{"url":"https://isc.sans.edu/feeds/urlsummary.txt","date":"2020-09-22"},{"url":"https://thedfirreport.com/2023/12/18/lets-opendir-some-presents-an-analysis-of-a-persistent-actors-activity/","date":"2023-12-18"},{"url":"https://rt-solar.ru/solar-4rays/blog/4333/","date":"2024-05-24"},{"url":"https://rt-solar.ru/solar-4rays/blog/4527/","date":"2024-07-18"},{"url":"https://www.f5.com/labs/articles/threat-intelligence/sensor-intel-series-top-cves-august-2024","date":"2024-09-19"},{"url":"https://www.f5.com/labs/articles/threat-intelligence/botpoke-scanner-switches-ip","date":"2024-11-25"},{"url":"https://www.f5.com/labs/articles/threat-intelligence/continued-scanning-for-cve-2023-1389","date":"2025-01-21"},{"url":"https://www.f5.com/labs/articles/geoserver-targeting-on-the-rise","date":"2026-02-11"}],"evidenceTotal":8,"provenance":"source"},"exploited":true,"otx":{"pulseCount":14,"pulses":[{"name":"GeoServer jsonArrayContains Unauth SQLi→RCE (GHSA-mqjf-5f49-2fjh) Active Probing","url":"https://otx.alienvault.com/pulse/6a8547beb4c9d3a3465acfad","created":"2026-08-19"},{"name":"Lets Open(Dir) Some Presents: An Analysis of a Persistent Actor’s Activity - The DFIR Report","url":"https://otx.alienvault.com/pulse/658a79420f8f96ffee12fcfa","created":"2023-12-26"},{"name":"Lets Open(Dir) Some Presents: An Analysis of a Persistent Actor’s Activity - The DFIR Report","url":"https://otx.alienvault.com/pulse/658a7926c898655185670f6c","created":"2023-12-26"},{"name":"Lets Open(Dir) Some Presents: An Analysis of a Persistent Actor’s Activity","url":"https://otx.alienvault.com/pulse/658023ce21df018653206daf","created":"2023-12-18"},{"name":"Lets Open(Dir) Some Presents: An Analysis of a Persistent Actor’s Activity - The DFIR Report","url":"https://otx.alienvault.com/pulse/658006fb6207fad983f5d589","created":"2023-12-18"},{"name":"Beware: Fake Exploit for WinRAR Vulnerability on GitHub Infects","url":"https://otx.alienvault.com/pulse/653f13e873ff3b279ce8deac","created":"2023-10-30"},{"name":"Fake CVE-2023-40477 Proof of Concept Leads to VenomRAT","url":"https://otx.alienvault.com/pulse/651411c676273215fd1c3669","created":"2023-09-27"},{"name":"September 27th, 2023 - CryptoGen Cyber Threat Intelligence Advisory #3306 - Sony Investigating After Hackers Offer to Sell Stolen Data","url":"https://otx.alienvault.com/pulse/6513c1e7908e8d033c538316","created":"2023-09-27"},{"name":"Beware: Fake Exploit for WinRAR Vulnerability on GitHub Infects","url":"https://otx.alienvault.com/pulse/651370c859378af3f4adad86","created":"2023-09-27"},{"name":"Beware: Fake Exploit for WinRAR Vulnerability on GitHub Infects Users with Venom RAT","url":"https://otx.alienvault.com/pulse/650c75977f8e340b06b8ab43","created":"2023-09-21"}],"provenance":"machine"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://github.com/geoserver/geoserver/security/advisories/GHSA-7g5f-wrx8-5ccf","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/geoserver/geoserver/commit/145a8af798590288d270b240235e89c8f0b62e1d","tags":["x_refsource_MISC"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"Maven","package":"org.geoserver.community:gs-jdbcconfig","vulnerableRanges":["<2.21.4",">=2.22.0, <2.22.2"],"patched":["2.21.4","2.22.2"],"from":["GHSA-7g5f-wrx8-5ccf"],"provenance":"source"}],"advisories":[{"id":"GHSA-7g5f-wrx8-5ccf","url":"https://github.com/advisories/GHSA-7g5f-wrx8-5ccf","severity":"CRITICAL","ecosystem":"Maven","package":"org.geoserver.community:gs-jdbcconfig","vulnerableRanges":["<2.21.4"],"patched":["2.21.4"],"provenance":"source","from":"GHSA"},{"id":"GHSA-7g5f-wrx8-5ccf","url":"https://github.com/advisories/GHSA-7g5f-wrx8-5ccf","severity":"CRITICAL","ecosystem":"Maven","package":"org.geoserver.community:gs-jdbcconfig","vulnerableRanges":[">=2.22.0, <2.22.2"],"patched":["2.22.2"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2023-0652","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2023-0652","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":7,"skipped":3,"earliest":"2023-06-06","earliestUrl":"https://github.com/win3zz/CVE-2023-25157","repos":[{"name":"win3zz/CVE-2023-25157","url":"https://github.com/win3zz/CVE-2023-25157","stars":165,"created":"2023-06-06"},{"name":"murataydemir/CVE-2023-25157-and-CVE-2023-25158","url":"https://github.com/murataydemir/CVE-2023-25157-and-CVE-2023-25158","stars":13,"created":"2023-06-11"},{"name":"0x2458bughunt/CVE-2023-25157","url":"https://github.com/0x2458bughunt/CVE-2023-25157","stars":10,"created":"2023-06-10"},{"name":"7imbitz/CVE-2023-25157-checker","url":"https://github.com/7imbitz/CVE-2023-25157-checker","stars":3,"created":"2023-06-12"},{"name":"charis3306/CVE-2023-25157","url":"https://github.com/charis3306/CVE-2023-25157","stars":3,"created":"2025-04-24"}]},"nuclei":[{"id":"CVE-2023-25157","name":"GeoServer OGC Filter - SQL Injection","severity":"critical","path":"http/cves/2023/CVE-2023-25157.yaml","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2023/CVE-2023-25157.yaml"}],"first":{"date":"2023-06-06","source":"PoC-in-GitHub","url":"https://github.com/win3zz/CVE-2023-25157"},"provenance":"source"},"detections":{"cveRules":[{"title":"Potential CVE-2023-25157 Exploitation Attempt","id":"c0341543-5ed0-4475-aabc-7eea8c52aa66","level":"high","status":"test","path":"rules-emerging-threats/2023/Exploits/CVE-2023-25157/web_cve_2023_25157_geoserver_sql_injection.yml","url":"https://github.com/SigmaHQ/sigma/blob/master/rules-emerging-threats/2023/Exploits/CVE-2023-25157/web_cve_2023_25157_geoserver_sql_injection.yml","techniques":[]}]},"exploitRefs":[],"flow":[],"timeline":[{"date":"2020-09-22","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://isc.sans.edu/feeds/urlsummary.txt","provenance":"source"},{"date":"2023-02-21","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2023-25157","provenance":"source"},{"date":"2023-06-06","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub","url":"https://github.com/win3zz/CVE-2023-25157","provenance":"source"}],"speed":{"daysToPublicExploit":105,"firstExploitFrom":"PoC-in-GitHub","daysToKev":null},"priority":{"score":68.9,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":0.0,"detail":"added 2255 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.4,"detail":"percentile 0.9702"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"7 PoC-in-GitHub repos; 1 nuclei template"},{"name":"Mentioned in OTX pulses","points":2.67,"detail":"14 pulses"},{"name":"CVSS severity","points":6.86,"detail":"base score 9.8"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}