HTTP Response Splitting Affecting io.ratpack:ratpack-core package, versions (0.9.1,1.7.5)


0.0
high
  • Exploit Maturity

    Proof of concept

  • Attack Complexity

    Low

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • snyk-id

    SNYK-JAVA-IORATPACK-473841

  • published

    18 Oct 2019

  • disclosed

    17 Oct 2019

  • credit

    Jonathan Leitschuh

How to fix?

Upgrade io.ratpack:ratpack-core to version 1.7.5 or higher.

Overview

io.ratpack:ratpack-core is a simple, capable, toolkit for creating high performance web applications.

Affected versions of this package are vulnerable to HTTP Response Splitting. If untrusted and unsanitized data is used to populate the headers of an HTTP response, an attacker can utilize this vulnerability to have the server issue any HTTP response they specify. The root cause was due to using the netty DefaultHttpHeaders object with verification disabled.

If your application uses arbitrary user input as the value of a response header it is vulnerable. If your application does not use arbitrary values as response header values, it is not vulnerable.

PoC by Jonathan Leitschuh

RatpackServer startedServer =  RatpackServer.start(server -> {
    server.handlers(chain -> chain.all(ctx -> {
        // User supplied query parameter
        String header = ctx.getRequest().getQueryParams().get("header");
        // User supplied data used to populate a header value.
        ctx.header("the-header", header)
            .render("OK!");
    }));
});