Vulnerabilities in pkg:maven/com.typesafe.akka/aakka-http-core_2.13.0-M3

PACKAGE
Advisory Identifier: GHSA-3hw2-h67c-wq66
Advisory Summary

CVE-2021-42697 is a HIGH (CVSS 7.5) uncontrolled recursion vulnerability (CWE-787: Out-of-bounds Write) affecting Akka http core 2.13.0 RC3 libraries in the Maven ecosystem. The issue involves uncontrolled recursion in akka http. Remediation is available by upgrading affected packages to version 10.1.15, 10.2.7.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/com.typesafe.akka/aakka-http-core_2.13.0-M3

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/com.typesafe.akka/aakka-http-core_2.13.0-M3. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-3hw2-h67c-wq66 CVE-2021-42697 HIGH Uncontrolled Recursion in Akka HTTP

CVE-2021-42697 at a Glance

CVE Identifier CVE-2021-42697
GHSA Identifier GHSA-3hw2-h67c-wq66
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-787: Out-of-bounds Write
Affected Product Akka http core 2.13.0 RC3
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 7.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:N/I:N/A:H).

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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2021-42697

To remediate this vulnerability, upgrade all affected Akka http core 2.13.0 RC3 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_2.13.0-RC3 fixed: Latest secure release
<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>akka-http-core_2.13.0-RC3</artifactId>
    <version>Latest secure release</version>
</dependency>
com.typesafe.akka:akka-http-core_2.13.0-RC2 fixed: Latest secure release
<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>akka-http-core_2.13.0-RC2</artifactId>
    <version>Latest secure release</version>
</dependency>
com.typesafe.akka:akka-http-core_2.13.0-M5 fixed: Latest secure release
<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>akka-http-core_2.13.0-M5</artifactId>
    <version>Latest secure release</version>
</dependency>
com.typesafe.akka:aakka-http-core_2.13.0-M3 fixed: Latest secure release
<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>aakka-http-core_2.13.0-M3</artifactId>
    <version>Latest secure release</version>
</dependency>
com.typesafe.akka:akka-http-core_2.13 fixed: 10.1.15
<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>akka-http-core_2.13</artifactId>
    <version>10.1.15</version>
</dependency>
com.typesafe.akka:akka-http-core_2.13 fixed: 10.2.7
<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>akka-http-core_2.13</artifactId>
    <version>10.2.7</version>
</dependency>
com.typesafe.akka:akka-http-core_2.12 fixed: 10.1.15
<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>akka-http-core_2.12</artifactId>
    <version>10.1.15</version>
</dependency>
com.typesafe.akka:akka-http-core_2.12 fixed: 10.2.7
<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>akka-http-core_2.12</artifactId>
    <version>10.2.7</version>
</dependency>
com.typesafe.akka:akka-http-core_2.11 fixed: 10.1.15
<dependency>
    <groupId>com.typesafe.akka</groupId>
    <artifactId>akka-http-core_2.11</artifactId>
    <version>10.1.15</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-42697, 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 2.13.0 RC3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.1.15), 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-787: Out-of-bounds Write, where the product writes data past the end, or before the beginning, of the intended buffer. In Akka http core 2.13.0 RC3, 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

Akka HTTP 10.1.x and 10.2.x before 10.2.7 can encounter stack exhaustion while parsing HTTP headers, which allows a remote attacker to conduct a Denial of Service attack by sending a User-Agent header with deeply nested comments.

CVE-2021-42697 Affected Akka http core 2.13.0 RC3 Versions

9 component(s)
Fixed Versions:
10.1.1510.2.7
Product / Package Ecosystem Affected Versions Fixed Version
com.typesafe.akka:akka-http-core_2.13.0-RC3
Maven
≥ 10.1.0
com.typesafe.akka:akka-http-core_2.13.0-RC2
Maven
≥ 10.1.0
com.typesafe.akka:akka-http-core_2.13.0-M5
Maven
≥ 10.1.0
com.typesafe.akka:aakka-http-core_2.13.0-M3
Maven
≥ 10.1.0
com.typesafe.akka:akka-http-core_2.13
Maven
≥ 10.1.0
< 10.1.15
10.1.15
com.typesafe.akka:akka-http-core_2.13
Maven
≥ 10.2.0-M1
< 10.2.7
10.2.7
com.typesafe.akka:akka-http-core_2.12
Maven
≥ 10.1.0
< 10.1.15
10.1.15
com.typesafe.akka:akka-http-core_2.12
Maven
≥ 10.2.0-M1
< 10.2.7
10.2.7
com.typesafe.akka:akka-http-core_2.11
Maven
≥ 10.1.0
< 10.1.15
10.1.15

References

Frequently Asked Questions

What is CVE-2021-42697?
CVE-2021-42697 is a security vulnerability in Akka http core 2.13.0 RC3 involving Uncontrolled Recursion in Akka HTTP under CWE-787: Out-of-bounds Write.
Which Akka http core 2.13.0 RC3 versions are affected?
Affected versions include releases prior to 10.1.15, 10.2.7 across affected packages: com.typesafe.akka:akka-http-core_2.13.0-RC3, com.typesafe.akka:akka-http-core_2.13.0-RC2, com.typesafe.akka:akka-http-core_2.13.0-M5, com.typesafe.akka:aakka-http-core_2.13.0-M3, com.typesafe.akka:akka-http-core_2.13, com.typesafe.akka:akka-http-core_2.12, com.typesafe.akka:akka-http-core_2.11.
What version fixes CVE-2021-42697?
Upgrading to 10.1.15, 10.2.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is akka-http-core_2.13.0-RC3 affected?
Yes, com.typesafe.akka:akka-http-core_2.13.0-RC3 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is akka-http-core_2.13.0-RC2 affected?
Yes, com.typesafe.akka:akka-http-core_2.13.0-RC2 is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2021-42697?
CVE-2021-42697 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2021-42697?
CVE-2021-42697 is classified under CWE-787: Out-of-bounds Write (The product writes data past the end, or before the beginning, of the intended buffer.).
How can I check Maven dependencies for CVE-2021-42697?
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-3hw2-h67c-wq66",
  "modified" : "2025-09-30T17:57:30Z",
  "published" : "2022-05-24T19:19:40Z",
  "aliases" : [ "CVE-2021-42697" ],
  "summary" : "Uncontrolled Recursion in Akka HTTP",
  "details" : "Akka HTTP 10.1.x and 10.2.x before 10.2.7 can encounter stack exhaustion while parsing HTTP headers, which allows a remote attacker to conduct a Denial of Service attack by sending a User-Agent header with deeply nested comments.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.typesafe.akka:akka-http-core_2.13.0-RC3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.1.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 10.1.15"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.typesafe.akka:akka-http-core_2.13.0-RC2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.1.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 10.1.15"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.typesafe.akka:akka-http-core_2.13.0-M5"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.1.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 10.1.15"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.typesafe.akka:aakka-http-core_2.13.0-M3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.1.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 10.1.15"
    }
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.typesafe.akka:akka-http-core_2.13"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.1.0"
      }, {
        "fixed" : "10.1.15"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.typesafe.akka:akka-http-core_2.13"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.2.0-M1"
      }, {
        "fixed" : "10.2.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.typesafe.akka:akka-http-core_2.12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.1.0"
      }, {
        "fixed" : "10.1.15"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.typesafe.akka:akka-http-core_2.12"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.2.0-M1"
      }, {
        "fixed" : "10.2.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.typesafe.akka:akka-http-core_2.11"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.1.0"
      }, {
        "fixed" : "10.1.15"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-42697"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/akka/akka-http/pull/3924"
  }, {
    "type" : "WEB",
    "url" : "https://akka.io/blog"
  }, {
    "type" : "WEB",
    "url" : "https://akka.io/blog/news/2021/11/02/akka-http-10.2.7-released"
  }, {
    "type" : "WEB",
    "url" : "https://akka.io/blog/news/2021/11/22/akka-http-10.1.15-released"
  }, {
    "type" : "WEB",
    "url" : "https://doc.akka.io/docs/akka-http/current/security/2021-CVE-2021-42697-stack-overflow-parsing-user-agent.html"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/akka/akka-http"
  }, {
    "type" : "WEB",
    "url" : "http://packetstormsecurity.com/files/167018/Akka-HTTP-10.1.14-Denial-Of-Service.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-674", "CWE-787" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-06-21T20:08:40Z",
    "nvd_published_at" : "2021-11-02T22:15:00Z"
  }
}