# CVE-2026-47066: benoitc hackney infinite loop in Alt-Svc header parser

Source: https://junglewise.ai/threats/cve-2026-47066-benoitc-hackney-infinite-loop-in-alt-svc-header-parser  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-25. Updated: 2026-06-26  
License: CC BY 4.0 with a link back

CVE-2026-47066 · Severity: high · CVSS 8.7 · Published 2026-05-25

Hackney, a popular HTTP client library for Erlang, is vulnerable to a denial-of-service attack. An attacker can send a specially crafted response header that causes the library to enter an infinite loop, consuming 100% of the server's CPU and causing the application to hang. This can lead to a complete service outage for any application that connects to a malicious or compromised web server.

Technologies: [Benoit Chesneau Hackney](https://junglewise.ai/threats/technologies/hackney). Vendors: [Benoit Chesneau](https://junglewise.ai/threats/vendors/benoit-chesneau).

## Quick answers

**Is CVE-2026-47066 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-47066 being exploited in the wild.

**How severe is CVE-2026-47066?** High severity, with a CVSS score of 8.7, published 25 May 2026.

**Which products and versions are affected?** Benoit Chesneau Hackney >= 2.0.0-beta.1, < 4.0.1, >= 2.0.0, < 4.0.1.

**Is there a fix for CVE-2026-47066?** A patch was published on 2026-06-26: Fixed in version 4.0.1 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-47066 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-47066?** Check whether you run Benoit Chesneau Hackney at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

The vulnerability is an infinite loop (CWE-835) located in `src/hackney_altsvc.erl`. When the `Alt-Svc` header parser encounters a non-token byte (such as `!`, `@`, or `=`) at the start of an entry, the `parse_token/2` function fails to consume any input and returns the original buffer. Because `parse_entries/2` does not detect this lack of progress, it recursively calls itself with the identical buffer, resulting in a tight tail-recursive loop. This pins an Erlang scheduler at 100% CPU and prevents the process from yielding. The issue is reachable via any synchronous HTTP response containing the malicious header and is fixed in version 4.0.1.

## Affected products

- benoitc hackney >= 2.0.0, < 4.0.1

## Identifiers

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

## Timeline

- 2026-05-25: disclosed: NVD publication date
- 2026-06-26: advisory: GitHub Advisory published
- 2026-06-26: patched: Fixed in version 4.0.1

## References

- [https://api.github.com/users/PJUllrich](https://api.github.com/users/PJUllrich)
- [https://github.com/PJUllrich](https://github.com/PJUllrich)
- [https://api.github.com/users/PJUllrich/gists%7B/gist_id%7D](https://api.github.com/users/PJUllrich/gists%7B/gist_id%7D)
- [https://api.github.com/users/PJUllrich/repos](https://api.github.com/users/PJUllrich/repos)
- [https://avatars.githubusercontent.com/u/10426523?v=4](https://avatars.githubusercontent.com/u/10426523?v=4)
- [https://api.github.com/users/PJUllrich/events%7B/privacy%7D](https://api.github.com/users/PJUllrich/events%7B/privacy%7D)

## Related threats

- [ex-aws ex_aws_sns signature bypass in verify_message/1](https://junglewise.ai/threats/cve-2026-47074-ex-aws-ex-aws-sns-signature-bypass-in-verify-message-1)
- [benoitc hackney resource exhaustion in HTTP/3 response loop](https://junglewise.ai/threats/cve-2026-47077-benoitc-hackney-resource-exhaustion-in-http-3-response-loop)
- [benoitc hackney SSRF via percent-encoded host in normalize/2](https://junglewise.ai/threats/cve-2026-47076-benoitc-hackney-ssrf-via-percent-encoded-host-in-normalize-2)
- [benoitc hackney unbounded memory consumption in WebSocket client](https://junglewise.ai/threats/cve-2026-47073-benoitc-hackney-unbounded-memory-consumption-in-websocket-client)
- [Benoitc hackney CRLF injection in WebSocket upgrade request](https://junglewise.ai/threats/cve-2026-47072-benoitc-hackney-crlf-injection-in-websocket-upgrade-request)
