The vulnerability (CVE-2025-27505) in GeoServer allows bypassing REST API security to access the index page. This is due to an improper path pattern configuration in its Spring Security setup. The patterns /rest/** and /gwc/rest/** were used to define which requests should be processed by the REST security filter chain (which includes org.geoserver.security.ServiceLoginFilterChain for authentication and authorization).
However, these patterns did not correctly match paths that included an extension, such as /rest.html or /gwc/rest.html. As a result, the org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter method, which is responsible for applying the correct filter chain based on the request path, would not route these specific requests through the intended security filters.
This bypass allowed unauthenticated users to access the REST API index pages (likely served by methods within org.geoserver.rest.IndexController), potentially disclosing information about installed GeoServer extensions.
The fix, as seen in commit 3534561e66ad3f483c0a29d53e608875fed0a3a2, involved updating these path patterns in various security/config.xml files and in the GeoServerSecurityFilterChain.java constants to /rest.*,/rest/** and /gwc/rest.*,/gwc/rest/**. These new patterns correctly cover paths with and without extensions, ensuring that all intended REST API endpoints are protected. The GeoServerSecurityManager.migrateFrom25() method was also added to automatically update existing configurations from the old, vulnerable patterns to the new, secure ones.