Skip to content
OpenAdvisories
High · 7.4 CVE-2022-29167 EUVD-2022-2298GHSA-44pw-h2cw-w3vq

ReDoS vulnerability in header parsing in hawk

Published May 5, 2022 · Updated Apr 23, 2025 · Assigned by GitHub_M

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 products

VendorProductAffectedFixed
mozilla hawk < 9.0.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-hawk 9.0.1-1 —
Debian 13 node-hawk 9.0.1-1 —
Debian 12 node-hawk 9.0.1-1 —
Debian 10 node-hawk 6.0.1+dfsg-1+deb10u1 DLA-3246-1
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS node-hawk 8.0.1+dfsg-1ubuntu0.22.04.1 USN-6116-1
Ubuntu 20.04 LTS node-hawk 7.1.2+dfsg-1ubuntu0.1 USN-6116-1
Ubuntu 18.04 LTS node-hawk 6.0.1+dfsg-1+deb10u1build0.18.04.1 USN-6116-1

Affected packages

EcosystemPackageAffectedFixedRecord
npm hawk < 9.0.1 9.0.1 GHSA-44pw-h2cw-w3vq

Advisories 3

References