Vulnerability · Published May 5, 2022 · Assigned by GitHub_M

CVE-2022-29167ReDoS vulnerability in header parsing in hawk

High 7.4

In plain English

A high-severity uncontrolled resource consumption in hawk from mozilla. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 66% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.4High
Exploit odds (30 days)1.1%top 34.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12node-hawk9.0.1-1DEBIAN-CVE-2022-29167
Debian:13node-hawk9.0.1-1DEBIAN-CVE-2022-29167
Debian:14node-hawk9.0.1-1DEBIAN-CVE-2022-29167
Ubuntu:22.04:LTSnode-hawk8.0.1+dfsg-1ubuntu0.22.04.1USN-6116-1
Ubuntu:22.04:LTSnode-hawk8.0.1+dfsg-1ubuntu0.22.04.1UBUNTU-CVE-2022-29167
npmhawk9.0.1GHSA-44pw-h2cw-w3vq

Affected products (as reported)

VendorProductVersions
mozilla hawk < 9.0.1

Weakness: CWE-400 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:H

References