GHSA-9xww-74xv-gjfp
Http4s: DigestAuth allows replay of captured requests
Quick fix
GHSA-9xww-74xv-gjfp — org.http4s:http4s-ember-core_2.12: upgrade to the fixed version with the command below.
# pom.xml: bump <version>0.23.35</version> for org.http4s:http4s-ember-core_2.12Details
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.
Are you affected?
Enter the version of the package you're using.
Affected packages
0Fixed in: 0.23.35# pom.xml: bump <version>0.23.35</version> for org.http4s:http4s-ember-core_2.120Fixed in: 0.23.35# pom.xml: bump <version>0.23.35</version> for org.http4s:http4s-ember-core_2.130Fixed in: 0.23.35# pom.xml: bump <version>0.23.35</version> for org.http4s:http4s-ember-core_31.0.0-M1Fixed in: 1.0.0-M47# pom.xml: bump <version>1.0.0-M47</version> for org.http4s:http4s-ember-core_2.131.0.0-M1Fixed in: 1.0.0-M47# pom.xml: bump <version>1.0.0-M47</version> for org.http4s:http4s-ember-core_3References
- https://github.com/http4s/http4s/security/advisories/GHSA-9xww-74xv-gjfp[WEB]
- https://github.com/http4s/http4s/commit/7f065101c45f3d86bc105e8fc6323c2c4a11471f[WEB]
- https://github.com/http4s/http4s[PACKAGE]
- https://github.com/http4s/http4s/releases/tag/v0.23.35[WEB]
- https://github.com/http4s/http4s/releases/tag/v1.0.0-M47[WEB]