CVE-2026-47067: Atom table exhaustion via unrecognized URL schemes in hackney

Published May 25, 2026
·
Updated

Summary

CVE-2026-47067 is an atom table exhaustion vulnerability (CWE-770) in hackney's URL parser (src/hackneyurl.erl). hackneyurl:parseurl/1 converts every URL scheme it encounters into a BEAM atom via binarytoatom/2. Because BEAM atoms are never garbage-collected and the atom table has a hard limit of 1,048,576 entries, an attacker who can feed URLs with attacker-chosen scheme prefixes — directly as request targets, as webhook/callback URLs, or via Location headers in redirect chains — can exhaust the atom table and crash the entire BEAM VM with systemlimit.

Details

1. Scheme extraction and conversion

In src/hackneyurl.erl, parseurl/1 extracts the scheme binary (the part before ://), validates it with isvalidscheme/1 (RFC 3986 alphabet: alpha-led, <=19 bytes, alphanumeric/+/-/. body), lowercases it, then calls:

erlang binarytoatom(SchemeLower, utf8)

The resulting atom is stored on the #hackneyurl{} record and returned to the caller.

2. Permanent atom accumulation

The validation constrains the alphabet but not uniqueness. The allowed scheme space is enormous (≈52·65¹⁸ values), far exceeding the default atom limit of 1,048,576. Each distinct scheme mints a new permanent atom. Even when hackney subsequently rejects an unsupported scheme with {error, {unsupportedscheme, }}, the atom has already been interned and is never reclaimed.

3. Crash vector

The most dangerous path is redirect following: when hackney follows a Location header, the redirect target URL is re-parsed by the same function. An attacker-controlled server can serve a sequence of redirects — or a batch of URLs from an upstream feed — each with a fresh unique scheme, driving the atom count monotonically upward. At the limit the BEAM emits systemlimit and the node terminates; recovery requires a full restart.

PoC

1. Call hackneyurl:parseurl/1 (or :hackney.request/5) repeatedly with URLs whose scheme prefixes are unique on each call: aaaa://x, aaab://x, aaac://x, … 2. After enough iterations, observe erlang:systeminfo(:atomcount) climbing by one per unique scheme. 3. At 1,048,576 atoms the VM crashes with systemlimit.

Alternatively, point hackney at a server that replies with a feed of ~1M URLs with distinct schemes (or uses redirect chains with rotating schemes); the atom table is exhausted and the node crashes without the client being able to intervene.

Impact

Unauthenticated remote denial of service via permanent resource exhaustion leading to VM termination. Any application using hackney 2.0.0 through 4.0.0 that processes attacker-influenced URLs — direct request targets, webhook URLs, or Location headers in followed redirects — is affected. No authentication or special configuration is required. CVSS v4.0 score: 8.7 (HIGH).

References

Introduction commit: https://github.com/benoitc/hackney/commit/d9713695c0d99855d12c73fd8a0b4be0543950c4 Patch commit: https://github.com/benoitc/hackney/commit/31f6f0e27e096ad88743dfded4f030a3ee74972e

Other sources

Allocation of Resources Without Limits or Throttling vulnerability in benoitc hackney allows Flooding. The URL parser in src/hackneyurl.erl converts every unrecognized URL scheme to a permanent BEAM atom via binarytoatom/2. BEAM atoms are never garbage-collected and the atom table defaults to a hard limit of 1,048,576 entries. An attacker who can supply URLs with attacker-chosen scheme prefixes — directly as request targets, as configured webhook URLs, or via Location headers followed during redirects — can exhaust the atom table and crash the entire BEAM VM with systemlimit.

This issue affects hackney: from 2.0.0 before 4.0.1.

— NVD

Affected Software

3 affected componentsFixes available
hexpm/hackney>=2.0.0<4.0.1
benoitc hackney>=2.0.0<4.0.1
erlang/hackney>=2.0.0<4.0.1
4.0.1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade erlang/hackney to a version that resolves this vulnerability.

    Fixed in 4.0.1

Event History

May 25, 2026
CVE Published
via MITRE·02:00 PM
Data Sourced
via MITRE·02:00 PM
DescriptionWeakness
Data Sourced
via NVD·03:16 PM
RemedyDescriptionSeverityWeaknessAffected Software
Jun 26, 2026
Advisory Published
via GitHub·10:01 PM
Data Sourced
via GitHub·10:01 PM
DescriptionWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-47067?

The severity of CVE-2026-47067 is rated as 71, indicative of a moderate risk level.

2

How do I fix CVE-2026-47067?

To mitigate CVE-2026-47067, limit or validate input URL schemes before parsing them to prevent unrecognized schemes from being added to the atom table.

3

What software is affected by CVE-2026-47067?

CVE-2026-47067 affects the hackney software, specifically version maintained by benoitc.

4

What type of vulnerability is CVE-2026-47067?

CVE-2026-47067 is classified as an 'Allocation of Resources Without Limits or Throttling' vulnerability.

5

What are the implications of CVE-2026-47067?

The implications of CVE-2026-47067 include potential denial-of-service attacks due to atom table exhaustion.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203