CVE-2026-47076

SSRF allowlist bypass via percent-encoded host in hackney

Published May 25, 2026 CVSS 4.0 · 6.9 Medium EPSS < 1% KEV · Not listed
Description
Interpretation Conflict vulnerability in benoitc hackney allows Server Side Request Forgery.

hackney_url:normalize/2 URL-decodes the host component after the URL has been parsed into a #hackney_url{} record. OTP's uri_string:parse/1 and inet:parse_address/1 do not decode percent-escapes in the host, so a URL such as http://%31%32%37%2E%30%2E%30%2E%31/ is seen by a caller's allowlist validator with host %31%32%37%2E%30%2E%30%2E%31 (not an IP address), which passes the allowlist check. hackney's normalizer then decodes the host to 127.0.0.1 and opens a TCP connection to loopback. Because hackney:request/5 always calls hackney_url:normalize/2 with no opt-out, every request that takes a binary or list URL is affected. The same technique reaches cloud instance metadata services (169.254.169.254), RFC1918 networks, and any admin interface listening on localhost.

This issue affects hackney: from 0.13.0 before 4.0.1.

Analysis

AI-generated

Technical impact

The vulnerability is an interpretation conflict in the hackney HTTP client library. During URL parsing, the host part is percent‑encoded, then decoded by hackney_url:normalize/2 after the URL is parsed into a record. Because OTP's uri_string:parse/1 and inet:parse_address/1 do not decode percent‑escapes in the host, a URL such as http://%31%32%37%2E%30%2E%30%2E%31/ is seen by an allowlist validator with host %31%32%37%2E%30%2E%30%2E%31, which passes the allowlist check. hackney's normalizer then decodes the host to 127.0.0.1 and opens a TCP connection, allowing an attacker who can influence a Hackney request to reach internal services, cloud metadata endpoints, RFC1918 networks, or any local admin interfaces. This condition enables server side request forgery, compromising confidentiality and integrity.

Affected Systems

The affected product is the Hackney HTTP client library, distributed by Benoit C. Versions from 0.13.0 through 4.0.0 are vulnerable. The library is widely used in Erlang and BEAM‑based applications.

Risk and Exploitability

The CVSS score of 6.9 classifies the weakness as medium severity. The EPSS score is 0.00229 (less than 1%), and the vulnerability is not listed in the CISA KEV catalog. The exploit requires an application to pass a specifically crafted URL to hackney:request/5; the percent‑encoded host bypasses the allowlist and activates the vulnerability. Because the flaw is exercised on every URL passed to hackney, any vulnerable application that uses the library for outbound HTTP requests is potentially exposed. Given the medium CVSS score, the low EPSS probability, and lack of widespread exploitation data, the risk is moderate but should be addressed promptly.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to hackney version 4.0.1 or later.
  • Block outbound connections to localhost, 169.254.169.254, and RFC1918 address ranges on the host network.
  • Validate or sanitize URLs before passing them to Hackney, ensuring that host components are not percent‑encoded or otherwise obfuscated.

Generated by OpenCVE AI on November 22, 2026 at 23:57 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-pj7v-xfvx-wmjq Hackney has SSRF allowlist bypass in hackney_url:normalize/2 via percent-encoded host
History
Type Values Removed Values Added
Description Interpretation Conflict vulnerability in benoitc hackney allows Server Side Request Forgery. hackney_url:normalize/2 URL-decodes the host component after the URL has been parsed into a #hackney_url{} record. OTP's uri_string:parse/1 and inet:parse_address/1 do not decode percent-escapes in the host, so a URL such as http://%31%32%37%2E%30%2E%30%2E%31/ is seen by a caller's allowlist validator with host %31%32%37%2E%30%2E%30%2E%31 (not an IP address), which passes the allowlist check. hackney's normalizer then decodes the host to 127.0.0.1 and opens a TCP connection to loopback. Because hackney:request/5 always calls hackney_url:normalize/2 with no opt-out, every request that takes a binary or list URL is affected. The same technique reaches cloud instance metadata services (169.254.169.254), RFC1918 networks, and any admin interface listening on localhost. This issue affects hackney: from 0.13.0 before 4.0.1. Interpretation Conflict vulnerability in benoitc hackney allows Server Side Request Forgery. hackney_url:normalize/2 URL-decodes the host component after the URL has been parsed into a #hackney_url{} record. OTP's uri_string:parse/1 and inet:parse_address/1 do not decode percent-escapes in the host, so a URL such as http://%31%32%37%2E%30%2E%30%2E%31/ is seen by a caller's allowlist validator with host %31%32%37%2E%30%2E%30%2E%31 (not an IP address), which passes the allowlist check. hackney's normalizer then decodes the host to 127.0.0.1 and opens a TCP connection to loopback. Because hackney:request/5 always calls hackney_url:normalize/2 with no opt-out, every request that takes a binary or list URL is affected. The same technique reaches cloud instance metadata services (169.254.169.254), RFC1918 networks, and any admin interface listening on localhost. This issue affects hackney: from 0.13.0 before 4.0.1.
References
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N'}

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description Interpretation Conflict vulnerability in benoitc hackney allows Server Side Request Forgery. hackney_url:normalize/2 URL-decodes the host component after the URL has been parsed into a #hackney_url{} record. OTP's uri_string:parse/1 and inet:parse_address/1 do not decode percent-escapes in the host, so a URL such as http://%31%32%37%2E%30%2E%30%2E%31/ is seen by a caller's allowlist validator with host %31%32%37%2E%30%2E%30%2E%31 (not an IP address), which passes the allowlist check. hackney's normalizer then decodes the host to 127.0.0.1 and opens a TCP connection to loopback. Because hackney:request/5 always calls hackney_url:normalize/2 with no opt-out, every request that takes a binary or list URL is affected. The same technique reaches cloud instance metadata services (169.254.169.254), RFC1918 networks, and any admin interface listening on localhost. This issue affects hackney: from 0.13.0 before 4.0.1.
Title SSRF allowlist bypass via percent-encoded host in hackney
First Time appeared Benoitc
Benoitc hackney
Weaknesses CWE-436
CWE-918
CPEs cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*
Vendors & Products Benoitc
Benoitc hackney
References
Metrics cvssV4_0

{'score': 6.9, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N'}

Weaknesses
  • CWE-436

    Interpretation Conflict

  • CWE-918

    Server-Side Request Forgery (SSRF)

Sources

Status
PUBLISHED
Assigner
EEF
Published
Updated
Nov 20, 2026, 8:20 AM
Reserved
May 18, 2026, 5:28 PM
Status
Modified
Published
May 25, 2026, 3:16 PM
Modified
Nov 20, 2026, 9:20 AM