Inefficient Regular Expression Complexity Affecting node-hawk package, versions <8.0.1+dfsg-2+deb11u1


Severity

Recommended
0.0
high
0
10

Snyk's Security Team recommends NVD's CVSS assessment. Learn more

Threat Intelligence

EPSS
0.1% (42nd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Inefficient Regular Expression Complexity vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-DEBIAN11-NODEHAWK-3153476
  • published4 Dec 2022
  • disclosed5 May 2022

Introduced: 5 May 2022

CVE-2022-29167  (opens in a new tab)
CWE-1333  (opens in a new tab)

How to fix?

Upgrade Debian:11 node-hawk to version 8.0.1+dfsg-2+deb11u1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream node-hawk package and not the node-hawk package as distributed by Debian. See How to fix? for Debian:11 relevant fixed versions and status.

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

CVSS Scores

version 3.1