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 arises from the Alt-Svc response header parser in hackney's src/hackney_altsvc.erl module, where the functions parse_token/2 and skip_comma/1 fail to properly advance when encountering unexpected characters. This causes parse_entries/2 to recurse infinitely with the same input, resulting in a tight infinite tail-recursive loop that pins a scheduler at 100% CPU usage and causes the calling process to hang. The entry point parse_and_cache/3 is synchronously called on every HTTP response, making the client susceptible to denial of service by any HTTP origin that sends a single-byte Alt-Svc header containing a non-token, non-whitespace, non-comma byte such as '!'. 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 send a crafted Alt-Svc response header that triggers an infinite loop in the hackney client, causing the client process to hang and consume 100% CPU on a scheduler thread. This results in a denial of service condition for the affected client application. There are no indications of privilege escalation or data corruption from the provided data.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary workaround is documented in the provided information. Users should monitor vendor communications for updates and consider limiting exposure to untrusted HTTP origins until a fix is available.
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.
CVSS v4.0
Score 8.7high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability arises from the Alt-Svc response header parser in hackney's src/hackney_altsvc.erl module, where the functions parse_token/2 and skip_comma/1 fail to properly advance when encountering unexpected characters. This causes parse_entries/2 to recurse infinitely with the same input, resulting in a tight infinite tail-recursive loop that pins a scheduler at 100% CPU usage and causes the calling process to hang. The entry point parse_and_cache/3 is synchronously called on every HTTP response, making the client susceptible to denial of service by any HTTP origin that sends a single-byte Alt-Svc header containing a non-token, non-whitespace, non-comma byte such as '!'. 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 send a crafted Alt-Svc response header that triggers an infinite loop in the hackney client, causing the client process to hang and consume 100% CPU on a scheduler thread. This results in a denial of service condition for the affected client application. There are no indications of privilege escalation or data corruption from the provided data.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary workaround is documented in the provided information. Users should monitor vendor communications for updates and consider limiting exposure to untrusted HTTP origins until a fix is available.
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: 05/25/2026, 18:58:27 UTC
Last enriched: 06/01/2026, 20:34:50 UTC
Last updated: 07/24/2026, 20:52:05 UTC
Views: 97
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.