Skip to content

EEF-CVE-2026-47066 CVE-2026-47066 GHSA-6cp8-v795-jr2j

Infinite loop in Alt-Svc header parser in hackney

High Hex
Severity
0.0 / 10
High · CVSS 4.0
Exploit chance (EPSS)
0.75%
Chance of exploitation in the next 30 days. Higher than 55.08% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop')
Fix
4.0.1
Upgrade hackney to this version or later

Description

Summary

Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in benoitc hackney allows Excessive Allocation. The Alt-Svc response header parser in src/hackney_altsvc.erl does not guarantee forward progress. When parse_token/2 receives a non-token, non-whitespace, non-comma byte (e.g. !, @, =, ;), it returns the input unchanged. skip_comma/1 also returns the buffer unchanged when the first byte is not a comma. parse_entries/2 then recurses with identical data, creating a tight infinite tail-recursive loop that pins a scheduler at 100% CPU. The calling process never returns.

The entry point parse_and_cache/3 is called synchronously in the connection process on every HTTP response. A single-byte Alt-Svc: ! response header is sufficient to trigger the hang; the header is fully controlled by any HTTP origin the client connects to.

This issue affects hackney: from 2.0.0-beta.1 before 4.0.1.

Affected versions

Hex

PackageVulnerableFixed in
hackney
>= 2.0.0-beta.1, < 4.0.1
4.0.1
hackney
>= 2.0.0, < 4.0.1
4.0.1

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

hackney Hex → 4.0.1

mix
{:hackney, "~> 4.0.1"} # then: mix deps.update hackney

Severity breakdown

CVSS 4.0 0.0

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Attack vector
Network
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
None
Availability (vulnerable system)
High
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None

CVSS 3.1 7.5

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

Weakness

CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')

The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
EEF-CVE-2026-97200
Unbounded response body buffering and decompression in hackney
Not rated yet Also affects hackney
EEF-CVE-2026-115693
Custom cacerts or cacertfile do not restrict trust to the pinned CA in hackney
Not rated yet Also affects hackney
EEF-CVE-2026-113440
HTTP/1.1 and HTTP/2 redirects resend basic_auth and cookie to a different scheme or port in hackney
Not rated yet Also affects hackney
EEF-CVE-2026-115700
SSRF allowlist bypass via percent-encoded bracketed IPv6 or trailing-dot IP literal in hackney
Not rated yet Also affects hackney
EEF-CVE-2026-112880
CRLF injection in Proxy-Authorization header built from proxy_auth_fun in hackney
Not rated yet Also affects hackney
EEF-CVE-2026-47073
Unbounded memory consumption in WebSocket client in hackney
High Also affects hackney
EEF-CVE-2026-47067
Atom table exhaustion via unrecognized URL schemes in hackney
High Also affects hackney
EEF-CVE-2026-47072
CRLF injection in WebSocket upgrade request in hackney
High Also affects hackney

Credits: Benoit Chesneau, Jonatan Männchen / EEF, Peter Ullrich

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor