GHSA-9xww-74xv-gjfp: Medium severity maven/org.http4s:http4s-ember-core_3 vulnerability
The DigestAuth replay defence stores lastNc + 1 rather than the nonce-count (nc) value it just accepted. When a legitimate client sends non-contiguous nc values (parallel or retried requests, as browsers do), the server's counter lags behind the highest nc seen, and a captured Authorization header can be replayed multiple times.
Impact
A passive observer can turn one captured Digest-authenticated request into several replayed authenticated (state-changing) requests, defeating the core replay protection Digest provides over Basic.
Preconditions
- Application uses DigestAuth. - Attacker can passively observe at least one legitimate digest request. - Legitimate client emits an nc more than one greater than the last, for instance from a parallel or retried request.
Workarounds
- Deploy over TLS so requests cannot be captured.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
maven/org.http4s:http4s-ember-core_3to a version that resolves this vulnerability.Fixed in 1.0.0-M47 - Upgrade
Upgrade
maven/org.http4s:http4s-ember-core_2.13to a version that resolves this vulnerability.Fixed in 1.0.0-M47 - Upgrade
Upgrade
maven/org.http4s:http4s-ember-core_3to a version that resolves this vulnerability.Fixed in 0.23.35 - Upgrade
Upgrade
maven/org.http4s:http4s-ember-core_2.13to a version that resolves this vulnerability.Fixed in 0.23.35 - Upgrade
Upgrade
maven/org.http4s:http4s-ember-core_2.12to a version that resolves this vulnerability.Fixed in 0.23.35 - Configuration
Deploy DigestAuth behind TLS so requests (including captured Authorization headers) cannot be passively observed and replayed.
DigestAuth Transport security (TLS) = Deploy over TLS - Compensating control
Mitigate replayed state-changing Digest requests by compensating externally (e.g., additional network/WAF/ACL controls) since an attacker can replay a captured Authorization header into multiple authenticated requests when the server’s DigestAuth replay defense lags behind non-contiguous nc values.
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using DigestAuth in http4s-ember-core for Scala 3 or Scala 2.13 are exposed when an attacker can passively observe Digest-authenticated traffic and clients issue non-contiguous nonce-count values, such as during parallel or retried requests.
What does an attacker need to exploit the replay weakness?
The attacker must capture at least one legitimate Digest Authorization header and the legitimate client must send an nc value more than one greater than the last accepted value. The attacker can then replay the captured request multiple times, including state-changing requests.
What can be done if updating is not immediately possible?
Deploy Digest-authenticated traffic over TLS to prevent passive observers from capturing Authorization headers. This workaround addresses the stated capture prerequisite.