CVE-2021-42697 in akka http server

LogPulse has a published detection rule for this CVE: it raises a notable when someone tries to exploit it.

What the vulnerability is

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.

Affected software: akka http server

Scores

What LogPulse has for it

How to mitigate it

Update Akka HTTP to 10.2.7 or 10.1.15 (nested User-Agent stack overflow)

Patch or upgrade. Akka HTTP 10.1.x before 10.1.15 and 10.2.x before 10.2.7 parse User-Agent comments recursively, so one request with deeply nested comments exhausts the stack and stops the service. The fixed releases limit the nesting depth.

Applies to: Akka HTTP server 10.1.x before 10.1.15 and 10.2.x before 10.2.7.

  1. Find services that depend on com.typesafe.akka:akka-http (sbt dependencyTree, mvn dependency:tree or gradle dependencies).
  2. Update akka-http to 10.2.7 or later (10.1.15 for the 10.1 line) and rebuild.
  3. Until the update is deployed, have the reverse proxy reject User-Agent headers with many nested brackets or longer than a sane limit.
  4. Redeploy and rerun the vulnerability scan to confirm CVE-2021-42697 is no longer reported.

Sources:

Source data: NIST NVD, CISA KEV and FIRST EPSS. LogPulse processes new CVEs every hour.

We build every detection with great care, but no two environments are the same. Log sources, parsing and configuration differ, so test a detection in your own environment before you rely on it.

Start free with LogPulse