CVE-2022-29167
Uncontrolled Resource Consumption in Hawk
Description
Hawk is an HTTP authentication scheme providing mechanisms for making authenticated HTTP requests with partial cryptographic verification of the request and response, covering the HTTP method, request URI, host, and optionally the request payload. Hawk used a regular expression to parse Host HTTP header (Hawk.utils.parseHost()), which was subject to regular expression DoS attack - meaning each added character in the attacker's input increases the computation time exponentially. parseHost() was patched in 9.0.1 to use built-in URL class to parse hostname instead.Hawk.authenticate() accepts options argument. If that contains host and port, those would be used instead of a call to utils.parseHost().
Affected Maven artifacts (2)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.mvnpm » hawkvia npm hawk | < 9.0.1 | 9.0.1 |
| org.webjars.npm » hawkvia npm hawk | < 9.0.1 | 9.0.1 |
Blast radius
33% of the dependent artifacts (2) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 5 |
| 2 hops | 7 |
Most used dependents
- org.webjars.npm » request89 usages
- org.webjars.npm » phantomjs7 usages
- org.mvnpm » request7 usages
- org.webjars.npm » coveralls2 usages
- org.webjars.npm » ionic0 usages
- org.webjars.npm » phantomjs2.00 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
Other ecosystems
Also affects npm (1 package) . See all on OSV
References
| Advisory | NVD CVE-2022-29167 | nvd.nist.gov |
| Package | mozilla/hawk | github.com |
| Web | mozilla/hawk advisory GHSA-44pw-h2cw-w3vq | github.com |
| Web | mozilla/hawk pull request #286 | github.com |
| Web | mozilla/hawk commit d10d72c | github.com |
