{"answers":{"affected":"4 open source packages ship an affected version, including org.geoserver.community:gs-jdbcconfig. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-25157 exists.","fix":"Upgrade org.geoserver.community:gs-jdbcconfig to a fixed version for your release line: 2.21.4 or 2.22.2.","what":"CVE-2023-25157 is a critical SQL injection vulnerability in geoserver, published on 21 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2023-25157 and fix it if it is affected.\n\nWhat it is: CVE-2023-25157 is a critical SQL injection vulnerability in geoserver, published on 21 Feb 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-25157 exists.\n\nAffected packages and fixed versions:\n- org.geoserver.community:gs-jdbcconfig (Maven): affected all versions; fixed in 2.21.4\n- org.geoserver.community:gs-jdbcconfig (Maven): affected all versions; fixed in 2.21.4\n- org.geoserver.community:gs-jdbcconfig (Maven): affected from 2.22.0; fixed in 2.22.2\n- org.geoserver.community:gs-jdbcconfig (Maven): affected from 2.22.0; fixed in 2.22.2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2023-25157/ (Markdown: https://insights.sbomify.com/CVE-2023-25157/index.md)","id":"CVE-2023-25157","markdown":"https://insights.sbomify.com/CVE-2023-25157/index.md","name":"CVE-2023-25157","record":{"aliases":["GHSA-7g5f-wrx8-5ccf"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"GeoServer","requires_auth":"none","summary":"Attackers can execute arbitrary SQL commands via unfiltered CQL filters in GeoServer, potentially reading or modifying geospatial data.","user_interaction":"not_required","vuln_class":"sql_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"geoserver","vendor":"osgeo"}],"cvss":{"score":9.8,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"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.","ecosystems":["Maven"],"exploits":{"exploitdb":0,"first_seen":"2023-06-06","github_poc":10,"max_poc_stars":166,"metasploit":0,"nuclei":1,"refs":[{"date":"2023-06-06T14:05:09Z","kind":"github_poc","ref":"https://github.com/win3zz/CVE-2023-25157","stars":166,"title":"CVE-2023-25157 - GeoServer SQL Injection - PoC"},{"date":"2023-06-11T18:57:18Z","kind":"github_poc","ref":"https://github.com/murataydemir/CVE-2023-25157-and-CVE-2023-25158","stars":13,"title":"GeoServer \u0026 GeoTools SQL Injection (CVE-2023-25157 \u0026 CVE-2023-25158)"},{"date":"2023-06-10T09:00:16Z","kind":"github_poc","ref":"https://github.com/0x2458bughunt/CVE-2023-25157","stars":10,"title":null},{"date":"2023-06-12T14:34:14Z","kind":"github_poc","ref":"https://github.com/7imbitz/CVE-2023-25157-checker","stars":4,"title":"A script, written in golang. POC for CVE-2023-25157"},{"date":"2025-04-24T09:12:18Z","kind":"github_poc","ref":"https://github.com/charis3306/CVE-2023-25157","stars":3,"title":"CVE-2023-25157 exp"},{"date":"2023-11-28T07:23:00Z","kind":"github_poc","ref":"https://github.com/dr-cable-tv/Geoserver-CVE-2023-25157","stars":2,"title":"Geoserver SQL Injection Exploit"},{"date":"2023-07-31T03:10:41Z","kind":"github_poc","ref":"https://github.com/Rubikcuv5/CVE-2023-25157","stars":0,"title":" GeoServer OGC Filter SQL Injection Vulnerabilities"},{"date":"2025-04-21T13:13:01Z","kind":"github_poc","ref":"https://github.com/custiya/geoserver-CVE-2023-25157","stars":0,"title":null}],"tier":"weaponised"},"has_fix":true,"headline":"Unfiltered SQL Injection Vulnerabilities in Geoserver","id":"CVE-2023-25157","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Maven","product":null,"products":[],"type":"sql_injection","year":"2023"},"n_packages":4,"n_references":2,"next":{"headline":"Unfiltered SQL Injection in Geotools","id":"CVE-2023-25158"},"packages":[{"ecosystem":"Maven","fixed":["2.21.4"],"introduced":["0"],"last_affected":[],"package":"org.geoserver.community:gs-jdbcconfig","purl":null,"source":"GHSA-7g5f-wrx8-5ccf"},{"ecosystem":"Maven","fixed":["2.21.4"],"introduced":["0"],"last_affected":[],"package":"org.geoserver.community:gs-jdbcconfig","purl":"pkg:maven/org.geoserver.community/gs-jdbcconfig","source":"GHSA-7g5f-wrx8-5ccf"},{"ecosystem":"Maven","fixed":["2.22.2"],"introduced":["2.22.0"],"last_affected":[],"package":"org.geoserver.community:gs-jdbcconfig","purl":null,"source":"GHSA-7g5f-wrx8-5ccf"},{"ecosystem":"Maven","fixed":["2.22.2"],"introduced":["2.22.0"],"last_affected":[],"package":"org.geoserver.community:gs-jdbcconfig","purl":"pkg:maven/org.geoserver.community/gs-jdbcconfig","source":"GHSA-7g5f-wrx8-5ccf"}],"prev":{"headline":"Kiwi TCMS has no protection against brute-force attacks on login page","id":"CVE-2023-25156"},"products":["geoserver"],"published":"2023-02-21","related":[{"cvss_score":9.3,"headline":"GeoServer has improper ENTITY_RESOLUTION_ALLOWLIST URI validation in XML Processing (SSRF)","id":"CVE-2024-34711","kev_date_added":null,"published":"2025-06-10"},{"cvss_score":8.6,"headline":"Unsecured WMS dynamic styling sld=\u003curl\u003e parameter affords blind unauthenticated SSRF in GeoServer","id":"CVE-2023-41339","kev_date_added":null,"published":"2023-10-24"},{"cvss_score":8.6,"headline":"WPS Server Side Request Forgery in GeoServer","id":"CVE-2023-43795","kev_date_added":null,"published":"2023-10-24"},{"cvss_score":7.5,"headline":"GeoServer Vulnerable to Unauthenticated SSRF via TestWfsPost","id":"CVE-2024-29198","kev_date_added":null,"published":"2025-06-10"},{"cvss_score":7.5,"headline":"GeoServer has an Infinite Loop Vulnerability in Jiffle process","id":"CVE-2025-30145","kev_date_added":null,"published":"2025-06-10"},{"cvss_score":7.5,"headline":"GeoServer allows SSRF via the option for setting a proxy host","id":"CVE-2021-40822","kev_date_added":null,"published":"2022-05-01"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-03-10","vendors":["geoserver"]},"summary":"Attackers can execute arbitrary SQL commands via unfiltered CQL filters in GeoServer, potentially reading or modifying geospatial data.","url":"https://insights.sbomify.com/CVE-2023-25157/"}