CVE-2021-23339: Akka http core HTTP Request Smuggling Vulnerability

MODERATE
Advisory Identifier: GHSA-2w7w-2j92-44hx
CVSS 6.5
CWE-444
Published
Advisory Summary

CVE-2021-23339 is a MODERATE (CVSS 6.5) http request smuggling vulnerability (CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')) affecting Akka http core libraries in the Maven ecosystem. The issue involves http request smuggling in akka-http-core. Remediation is available by upgrading affected packages to version 10.2.4, 10.1.14.

CVE-2021-23339 at a Glance

CVE Identifier CVE-2021-23339
GHSA Identifier GHSA-2w7w-2j92-44hx
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
Affected Product Akka http core
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2021-23339

To remediate this vulnerability, upgrade all affected Akka http core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.typesafe.akka:akka-http-core fixed: 10.2.4
<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>akka-http-core</artifactId>
    <version>10.2.4</version>
</dependency>
com.typesafe.akka:akka-http-core fixed: 10.1.14
<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>akka-http-core</artifactId>
    <version>10.1.14</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=com.typesafe.akka

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2021-23339, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.typesafe.akka

Analyze the terminal output to locate any version of Akka http core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.2.4), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.typesafe.akka command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling'), where the product acts as an intermediary http agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed http requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination. In Akka http core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A vulnerable Akka HTTP server will accept a malformed message and hand it over to the user. If the user application proxies this message to another server unchanged and that server also accepts that message but interprets it as two HTTP messages, the second message has reached the second server without having been inspected by the proxy.

CVE-2021-23339 Affected Akka http core Versions

2 component(s)
Fixed Versions:
10.2.410.1.14
Product / Package Ecosystem Affected Versions Fixed Version
com.typesafe.akka:akka-http-core
Maven
≥ 10.2.0
< 10.2.4
10.2.4
com.typesafe.akka:akka-http-core
Maven
< 10.1.14
10.1.14

References

Frequently Asked Questions

What is CVE-2021-23339?
CVE-2021-23339 is a security vulnerability in Akka http core involving HTTP Request Smuggling in akka-http-core under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling').
Which Akka http core versions are affected?
Affected versions include releases prior to 10.2.4, 10.1.14 across affected packages: com.typesafe.akka:akka-http-core.
What version fixes CVE-2021-23339?
Upgrading to 10.2.4, 10.1.14 (or the latest patched release for your respective branch) resolves the vulnerability.
Is akka-http-core affected?
Yes, com.typesafe.akka:akka-http-core is affected in releases prior to 10.2.4, 10.1.14. Upgrade your dependency to 10.2.4, 10.1.14 or later.
What is the CVSS score of CVE-2021-23339?
CVE-2021-23339 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2021-23339?
CVE-2021-23339 is classified under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') (The product acts as an intermediary HTTP agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed HTTP requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination.).
How can I check Maven dependencies for CVE-2021-23339?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.typesafe.akka'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-2w7w-2j92-44hx",
  "modified" : "2021-03-19T22:36:01Z",
  "published" : "2021-05-10T15:17:09Z",
  "aliases" : [ "CVE-2021-23339" ],
  "summary" : "HTTP Request Smuggling in akka-http-core",
  "details" : "A vulnerable Akka HTTP server will accept a malformed message and hand it over to the user. If the user application proxies this message to another server unchanged and that server also accepts that message but interprets it as two HTTP messages, the second message has reached the second server without having been inspected by the proxy.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.typesafe.akka:akka-http-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.2.0"
      }, {
        "fixed" : "10.2.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.typesafe.akka:akka-http-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "10.1.14"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-23339"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/akka/akka-http/pull/3754%23issuecomment-779265201"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/akka/akka-http/commit/e3a4935151c91cee28e65e6b894dd50839ef9d34"
  }, {
    "type" : "WEB",
    "url" : "https://doc.akka.io/docs/akka-http/10.1/security/2021-02-24-incorrect-handling-of-Transfer-Encoding-header.html"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JAVA-COMTYPESAFEAKKA-1075043"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-444" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-03-19T22:36:01Z",
    "nvd_published_at" : "2021-02-17T08:15:00Z"
  }
}