CVE-2021-42697 Uncontrolled Recursion in Akka HTTP

High 7.5 Published Updated

Remote attackers can cause denial of service in Akka HTTP by sending deeply nested comments in User-Agent headers, exhausting the stack.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-42697?

CVE-2021-42697 is a high-severity denial of service vulnerability in n/a, published on 2 Nov 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Akka HTTP 10.1.x before 10.1.15 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.

Weakness: CWE-674

Which versions are affected by CVE-2021-42697?

18 open source packages ship an affected version, including com.typesafe.akka:akka-http-core_2.12, com.typesafe.akka:aakka-http-core_2.13.0-M3 and com.typesafe.akka:akka-http-core_2.11. It affects 1 product.

PackageAffectedFixed in
com.typesafe.akka:akka-http-core_2.12 MavenFrom 10.1.010.1.15
com.typesafe.akka:akka-http-core_2.12 MavenFrom 10.1.010.1.15
com.typesafe.akka:akka-http-core_2.12 MavenFrom 10.2.0-M110.2.7
com.typesafe.akka:akka-http-core_2.12 MavenFrom 10.2.0-M110.2.7
com.typesafe.akka:aakka-http-core_2.13.0-M3 MavenFrom 10.1.0None
com.typesafe.akka:aakka-http-core_2.13.0-M3 MavenFrom 10.1.0None
12 more packages
com.typesafe.akka:akka-http-core_2.11 MavenFrom 10.1.010.1.15
com.typesafe.akka:akka-http-core_2.11 MavenFrom 10.1.010.1.15
com.typesafe.akka:akka-http-core_2.13 MavenFrom 10.1.010.1.15
com.typesafe.akka:akka-http-core_2.13 MavenFrom 10.1.010.1.15
com.typesafe.akka:akka-http-core_2.13 MavenFrom 10.2.0-M110.2.7
com.typesafe.akka:akka-http-core_2.13 MavenFrom 10.2.0-M110.2.7
com.typesafe.akka:akka-http-core_2.13.0-M5 MavenFrom 10.1.0None
com.typesafe.akka:akka-http-core_2.13.0-M5 MavenFrom 10.1.0None
com.typesafe.akka:akka-http-core_2.13.0-RC2 MavenFrom 10.1.0None
com.typesafe.akka:akka-http-core_2.13.0-RC2 MavenFrom 10.1.0None
com.typesafe.akka:akka-http-core_2.13.0-RC3 MavenFrom 10.1.0None
com.typesafe.akka:akka-http-core_2.13.0-RC3 MavenFrom 10.1.0None

Products include Akka Http Server.

How do I fix CVE-2021-42697?

Upgrade com.typesafe.akka:akka-http-core_2.12 to a fixed version for your release line: 10.1.15 or 10.2.7.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2021-42697 being exploited?

There is no known exploitation of CVE-2021-42697 in the wild and no public exploit code.

Public exploit code: 1 Exploit-DB entry and 1 proofs of concept on GitHub.

Sources

Also known as GHSA-3hw2-h67c-wq66.

Is CVE-2021-42697 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free