CVE-2026-47066: CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop') in benoitc hackney
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.
AI Analysis
Technical Summary
The vulnerability in benoitc hackney arises from the Alt-Svc response header parser in src/hackney_altsvc.erl, where parse_token/2 and skip_comma/1 functions fail to advance the parsing buffer upon encountering certain non-token, non-whitespace, non-comma bytes. This causes parse_entries/2 to enter a tight infinite tail-recursive loop, consuming 100% CPU on a scheduler and causing the calling connection process to hang indefinitely. The entry point parse_and_cache/3 is synchronously called on every HTTP response, making this a readily triggerable denial-of-service condition by sending a single-byte Alt-Svc header with a problematic character. The issue affects hackney versions from 2.0.0-beta.1 up to but not including 4.0.1.
Potential Impact
An attacker controlling an HTTP origin can cause a denial-of-service condition by sending a crafted Alt-Svc header that triggers an infinite loop in the hackney client. This results in a scheduler being pinned at 100% CPU and the connection process hanging indefinitely, potentially disrupting client operations that rely on hackney for HTTP communication. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or workaround is currently documented. Users should monitor vendor communications for updates and consider mitigating exposure by restricting or validating Alt-Svc headers from untrusted origins if feasible.
CVE-2026-47066: CWE-835 Loop with Unreachable Exit Condition ('Infinite Loop') in benoitc hackney
Description
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in benoitc hackney arises from the Alt-Svc response header parser in src/hackney_altsvc.erl, where parse_token/2 and skip_comma/1 functions fail to advance the parsing buffer upon encountering certain non-token, non-whitespace, non-comma bytes. This causes parse_entries/2 to enter a tight infinite tail-recursive loop, consuming 100% CPU on a scheduler and causing the calling connection process to hang indefinitely. The entry point parse_and_cache/3 is synchronously called on every HTTP response, making this a readily triggerable denial-of-service condition by sending a single-byte Alt-Svc header with a problematic character. The issue affects hackney versions from 2.0.0-beta.1 up to but not including 4.0.1.
Potential Impact
An attacker controlling an HTTP origin can cause a denial-of-service condition by sending a crafted Alt-Svc header that triggers an infinite loop in the hackney client. This results in a scheduler being pinned at 100% CPU and the connection process hanging indefinitely, potentially disrupting client operations that rely on hackney for HTTP communication. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or workaround is currently documented. Users should monitor vendor communications for updates and consider mitigating exposure by restricting or validating Alt-Svc headers from untrusted origins if feasible.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-05-18T17:28:08.321Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a149bd3a5ae1af1aad77309
Added to database: 5/25/2026, 6:58:27 PM
Last enriched: 5/25/2026, 6:58:38 PM
Last updated: 5/26/2026, 7:54:22 AM
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.