Http4s: DigestAuth nonce map grows unbounded
http4s
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| org.http4s:http4s-ember-server_2.12 Maven |
|
|
| org.http4s:http4s-ember-server_2.13 Maven |
|
|
http4s
| Product | Affected | Fixed in |
|---|---|---|
| org.http4s:http4s-ember-server_2.12 Maven |
|
|
| org.http4s:http4s-ember-server_2.13 Maven |
|
|
1.0.0-M47| org.http4s:http4s-ember-server_3 Maven |
|
|
Http4s is a Scala interface for HTTP services. Prior to 0.23.35 and 1.0.0-M47, the DigestAuth server middleware removes fresh nonces and stops eviction at the first stale nonce because its stale-nonce comparison is inverted. On an application that protects at least one route with DigestAuth, an unauthenticated attacker can repeatedly trigger authentication challenges, causing the persistent nonce map to grow until the JVM exhausts heap memory. This issue is fixed in versions 0.23.35 and 1.0.0-M47.
From the CVE record · GitHub_M
The http4s DigestAuth server middleware has an inverted stale-nonce comparison that allows its nonce map to grow. If an application protects at least one route with DigestAuth, an unauthenticated attacker can repeatedly trigger authentication challenges until the JVM exhausts heap memory. No user interaction is required.
Teams running Maven org.http4s:http4s-ember-server_2.12 before 0.23.35, or org.http4s:http4s-ember-server_2.13 or _3 before 0.23.35 or from 1.0.0-M1 through versions before 1.0.0-M47, should check their applications.