GeoServer Vulnerable to Unauthenticated SSRF via TestWfsPost
SummaryIt possible to achieve Service Side Request Forgery (SSRF) via the Demo request endpoint if Proxy Base URL has not been set.DetailsA unauthenticated user can supply a request that will be issued by the server. This can be used to enumerate internal networks and also in the case of cloud instances can be used to obtain sensitive data.MitigationWhen using GeoServer with a proxy, manage the proxy base value as a system administrator, use the application property ``PROXY_BASE_URL`` to provide a non-empty value that cannot be overridden by the user interface or incoming request.When using GeoServer directly without a proxy, block all access to TestWfsPost by editing the web.xml file. Adding this block right before the end:ResolutionUpgrading to GeoServer 2.24.4, or 2.25.2, removes the ``TestWfsPost`` servlet resolving this issue.The demo request page functionality is now implemented directly in the browser.Referencehttps://osgeo-org.atlassian.net/browse/GEOS-11794https://osgeo-org.atlassian.net/browse/GEOS-11390https://nvd.nist.gov/vuln/detail/CVE-2021-40822