{"answers":{"affected":"2 open source packages ship an affected version, including hawk. It affects 1 product.","exploited":"There is no known exploitation of CVE-2022-29167 in the wild and no public exploit code.","fix":"Upgrade hawk to 9.0.1 or later.","what":"CVE-2022-29167 is a high-severity denial of service vulnerability in mozilla hawk, published on 5 May 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2022-29167 and fix it if it is affected.\n\nWhat it is: CVE-2022-29167 is a high-severity denial of service vulnerability in mozilla hawk, published on 5 May 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of CVE-2022-29167 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- hawk (npm): affected all versions; fixed in 9.0.1\n- hawk (npm): affected all versions; fixed in 9.0.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2022-29167/ (Markdown: https://insights.sbomify.com/CVE-2022-29167/index.md)","id":"CVE-2022-29167","markdown":"https://insights.sbomify.com/CVE-2022-29167/index.md","name":"CVE-2022-29167","record":{"aliases":["CLSA-2026-1776818225","DEBIAN-CVE-2022-29167","DLA-3246-1","GHSA-44pw-h2cw-w3vq","MGASA-2024-0086","OESA-2022-1667","UBUNTU-CVE-2022-29167","USN-6116-1"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"Node.js HTTP authentication library","requires_auth":"none","summary":"An attacker can cause a denial of service in the Hawk library by sending a malicious Host header that triggers exponential regex backtracking.","user_interaction":"required","vuln_class":"denial_of_service"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"hawk","vendor":"mozilla"}],"cvss":{"score":7.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:N/A:H","version":"3.1"},"cwes":[{"id":"CWE-1333","name":"Inefficient Regular Expression Complexity"},{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"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()`.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"ReDoS vulnerability in header parsing in hawk","id":"CVE-2022-29167","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"denial_of_service","year":"2022"},"n_packages":2,"n_references":2,"next":{"headline":"Cross Site Scripting in Wire Messages","id":"CVE-2022-29168"},"packages":[{"ecosystem":"npm","fixed":["9.0.1"],"introduced":["0"],"last_affected":[],"package":"hawk","purl":null,"source":"GHSA-44pw-h2cw-w3vq"},{"ecosystem":"npm","fixed":["9.0.1"],"introduced":["0"],"last_affected":[],"package":"hawk","purl":"pkg:npm/hawk","source":"GHSA-44pw-h2cw-w3vq"}],"prev":{"headline":"Improper handling of multiline messages in matrix-appservice-irc","id":"CVE-2022-29166"},"products":["hawk"],"published":"2022-05-05","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-23","vendors":["mozilla"]},"summary":"An attacker can cause a denial of service in the Hawk library by sending a malicious Host header that triggers exponential regex backtracking.","url":"https://insights.sbomify.com/CVE-2022-29167/"}