Micronaut HTTP clients share cookies across users, leak proxy credentials, and allow SSRF and cookie injection through request construction
Description
The JDK HTTP client uses one cookie jar per client, so a session cookie set for one user is replayed on other users' requests (the raw client was fixed in core#13260, the regular client was not), and its Authenticator answers both proxy and origin challenges, sending proxy credentials to the origin on a 401. Client URI resolution treats a scheme-relative path (//host/...) built from application data as a different host (ServiceInstance.resolve), enabling SSRF, and NettyLaxClientCookieEncoder does not validate values, so a ; in a cookie value injects additional cookies. Depending on how the application uses the client, a remote party can obtain other users' sessions or credentials, or redirect requests to an internal host. The fix is to scope cookie storage per request context (or disable it by default), answer only proxy challenges with proxy credentials, treat // paths as paths, and validate cookie values.
Affected and patched versions
Scheme-relative ServiceInstance resolution is in micronaut-runtime on 3.x and earlier, and micronaut-discovery-core on later lines. The lax client cookie encoder is in micronaut-http-client, with micronaut-http-netty variants since 4.3.0. JDK client variants start in 4.0.0.
| Package | Affected versions | Patched version |
|---|---|---|
io.micronaut:micronaut-http-client-jdk | >= 4.0.0, < 4.10.37 | 4.10.37 |
io.micronaut:micronaut-http-client-jdk | >= 5.0.0, < 5.2.23 | 5.2.23 |
io.micronaut:micronaut-http-netty | >= 4.3.0, < 4.10.37 | 4.10.37 |
io.micronaut:micronaut-http-netty | >= 5.0.0, < 5.2.23 | 5.2.23 |
io.micronaut:micronaut-http-client | < 3.10.19 | 3.10.19 |
io.micronaut:micronaut-http-client | >= 4.0.0, < 4.10.37 | 4.10.37 |
io.micronaut:micronaut-http-client | >= 5.0.0, < 5.2.23 | 5.2.23 |
io.micronaut:micronaut-discovery-core | >= 4.0.0, < 4.10.37 | 4.10.37 |
io.micronaut:micronaut-discovery-core | >= 5.0.0, < 5.2.23 | 5.2.23 |
io.micronaut:micronaut-runtime | < 3.10.19 | 3.10.19 |
The 3.x fix is in commit 4455d1f27e, first included in stable release 3.10.19. The last affected stable 3.10.x release is 3.10.18.
Findings
- ANT-2026-QR81VUTL
- ANT-2026-QLK8P3IV
- ANT-2026-55M0KZLN
- ANT-2026-J0CC7DWB
Affected versions
- io.micronaut:micronaut-http-client-jdkFrom 4.0.0 · fixed in 4.10.37
- io.micronaut:micronaut-http-client-jdkFrom 5.0.0 · fixed in 5.2.23
- io.micronaut:micronaut-http-nettyFrom 4.3.0 · fixed in 4.10.37
- io.micronaut:micronaut-http-nettyFrom 5.0.0 · fixed in 5.2.23
- io.micronaut:micronaut-http-clientfixed in 3.10.19
- io.micronaut:micronaut-http-clientFrom 4.0.0 · fixed in 4.10.37
- io.micronaut:micronaut-http-clientFrom 5.0.0 · fixed in 5.2.23
- io.micronaut:micronaut-discovery-coreFrom 4.0.0 · fixed in 4.10.37
- io.micronaut:micronaut-discovery-coreFrom 5.0.0 · fixed in 5.2.23
- io.micronaut:micronaut-runtimefixed in 3.10.19