Spring Framework Denial of Service with HTTP client observations
Spring applications that send HTTP client requests with an HTTP method derived from untrusted input may be vulnerable to a denial of service attack. Specifically, an application is vulnerable when all the following conditions are met: The application is using RestClient , RestTemplate or WebClient with an ObservationRegistry configured and Micrometer metrics enabled The application uses the default ClientRequestObservationConvention The application sends HTTP client requests with an HTTP method chosen by a remote user, for example by forwarding the method of an incoming request to a downstream service The configured ClientHttpRequestFactory or ClientHttpConnector accepts non-standard HTTP methods When all conditions are met, an attacker can send many requests with distinct HTTP methods that each create a new http.client.requests metric, eventually exhausting the application memory.