Skip to main content
Menu
Advisories

Micronaut HTTP/2 server closes the whole connection when a request with Expect: 100-continue is rejected before its body is read

GHSA-75C9-C2HM-HJQGPublished Updated GitHub

Description

Impact

What kind of vulnerability is it? Who is impacted?

Denial of service (CWE-755 improper handling of exceptional conditions)..

When a client sends a request with Expect: 100-continue and the server responds without reading the body (for example a 401 or 403 from a security filter, a 404, a 405, or a 413), the server writes the interim 100 Continue response after the final response headers. Netty treats this as an HTTP/2 connection error and sends GOAWAY(INTERNAL_ERROR), closing the connection and aborting every other in-flight stream on it. A related defect turns a malformed request HEADERS frame (missing :method or :path) into the same connection-level failure instead of a stream error.

Impacted: applications that enable HTTP/2. On a direct client connection the attacker only terminates their own connection. Behind a reverse proxy or service mesh that multiplexes several users over one HTTP/2 connection to the backend (common with Envoy, nginx and gRPC gateways), one crafted request aborts other users' in-flight requests, repeatedly.

Patches

Has the problem been patched? What versions should users upgrade to?

Patched in 3.10.16, 4.10.33 and 5.2.17. The interim response is only written while no final response has started, discarding the body clears the pending interim response, and the stream that stops an unwanted upload is reset with RST_STREAM instead of failing the connection. Malformed pseudo-headers produce a stream-level PROTOCOL_ERROR .

Workarounds

Is there a way for users to fix or remediate the vulnerability without upgrading?

  • Disable HTTP/2 on the Micronaut listener, or configure the proxy to use one upstream connection per client so that a connection failure cannot affect other users.
  • Strip the Expect header at the proxy so that the server never emits an interim response.

References

Are there any links users can visit to find out more?

Affected versions

References

GitHub · micronaut-projects/micronaut-core