{"id":"CVE-2026-47075","aliases":["CVE-2026-47075","GHSA-j9wq-vxxc-94wf","EEF-CVE-2026-47075"],"related":[],"kind":"vulnerability","state":"published","title":"CR/LF injection in query parameter in hackney","summary":"Improper Neutralization of CRLF Sequences vulnerability in benoitc hackney allows HTTP Request Splitting.\n\nhackney does not percent-encode carriage return (\\r) or line feed (\\n) characters in the URL query component before constructing the HTTP/1.1 request target. Characters outside the grammar defined in RFC 3986 Section 3.4 must be percent-encoded, but hackney_url:make_url/3 passes the query binary directly without validation or escaping. An attacker who can control all or part of a URL passed to hackney can inject raw CRLF sequences into the query string, which are then sent as HTTP line breaks in the request target. This enables injection of arbitrary HTTP headers or splitting of the HTTP request.\n\nThis issue affects hackney: from 0.1.0 before 4.0.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Improper Neutralization of CRLF Sequences vulnerability in benoitc hackney allows HTTP Request Splitting.\n\nhackney does not percent-encode carriage return (\\r) or line feed (\\n) characters in the URL query component before constructing the HTTP/1.1 request target. Characters outside the grammar defined in RFC 3986 Section 3.4 must be percent-encoded, but hackney_url:make_url/3 passes the query binary directly without validation or escaping. An attacker who can control all or part of a URL passed to hackney can inject raw CRLF sequences into the query string, which are then sent as HTTP line breaks in the request target. This enables injection of arbitrary HTTP headers or splitting of the HTTP request.\n\nThis issue affects hackney: from 0.1.0 before 4.0.1.","source":"cvelist"},{"lang":"en","text":"### Summary\n\n`hackney_url:make_url/3` passes the URL query component directly into the HTTP/1.1 request target without percent-encoding `\\r` or `\\n`. RFC 3986 §3.4 requires characters outside the query grammar to be percent-encoded, but no validation or escaping occurs. An attacker who controls any portion of the URL passed to hackney can inject raw CRLF sequences into the request line, enabling HTTP header injection or full request splitting.\n\n### Details\n\n`hackney_url:make_url/3` in `src/hackney_url.erl` builds the request target by concatenating the path and query binaries. The query string is used as-is — no character-class check, no percent-encoding of `\\r` or `\\n`. When hackney serializes the request, the query value lands verbatim in the `GET <path>?<query> HTTP/1.1\\r\\n` request line. A query value containing `\\r\\n` terminates the request line early; subsequent bytes are parsed by the server (or any intermediary proxy) as additional header lines or a second request.\n\nA concrete example: a URL with query `?q=x HTTP/1.1\\r\\nX-Injected: yes\\r\\nX:` produces the following on the wire:\n\n```\nGET /?q=x HTTP/1.1\nX-Injected: yes\nX: HTTP/1.1\nHost: ...\n```\n\nThe server sees `X-Injected: yes` as a legitimate request header that the client never intended to send.\n\n### PoC\n\n1. Listen on a raw TCP port: `nc -lvnp 8080`.\n2. Issue: `:hackney.get(\"http://127.0.0.1:8080/?q=x HTTP/1.1\\r\\nX-Injected: yes\\r\\nX:\")`.\n3. Observe the listener receives `X-Injected: yes` as a standalone header line in the request.\n\n### Impact\n\nHTTP header injection and request splitting against any server hackney connects to. Affects all released versions of hackney before 4.0.1. Exploitation requires an attacker-controlled URL (or URL component) to reach hackney without prior sanitization. Consequences include injecting arbitrary headers (`Authorization`, `Host`, `X-Forwarded-For`) and splitting requests through proxies. CVSS v4.0: **6.8 (MEDIUM)**.\n\n## Resources\n\n* Introduction commit: https://github.com/benoitc/hackney/commit/8bb1a359a81ae58567c84f8d24564e9742e6f2bd\n* Patch commit: https://github.com/benoitc/hackney/commit/ca73dd0aba0ed557449c18288bf07241671a43c9","format":"markdown","source":"ghsa"},{"lang":"en","text":"## Summary\n\nImproper Neutralization of CRLF Sequences vulnerability in benoitc hackney allows HTTP Request Splitting.\n\nhackney does not percent-encode carriage return (`\\r`) or line feed (`\\n`) characters in the URL query component before constructing the HTTP/1.1 request target. Characters outside the grammar defined in RFC 3986 Section 3.4 must be percent-encoded, but `hackney_url:make_url/3` passes the query binary directly without validation or escaping. An attacker who can control all or part of a URL passed to hackney can inject raw CRLF sequences into the query string, which are then sent as HTTP line breaks in the request target. This enables injection of arbitrary HTTP headers or splitting of the HTTP request.\n\nThis issue affects hackney: from 0.1.0 before 4.0.1.","format":"markdown","source":"eef"},{"lang":"es","text":"Vulnerabilidad de neutralización incorrecta de secuencias CRLF en benoitc hackney permite la división de solicitudes HTTP. hackney no codifica en porcentaje los caracteres de retorno de carro (\\r) o salto de línea (\\n) en el componente de consulta de la URL antes de construir el objetivo de la solicitud HTTP/1.1. Los caracteres fuera de la gramática definida en la Sección 3.4 de RFC 3986 deben ser codificados en porcentaje, pero hackney_url:make_url/3 pasa el binario de consulta directamente sin validación ni escape. Un atacante que puede controlar la totalidad o parte de una URL pasada a hackney puede inyectar secuencias CRLF sin procesar en la cadena de consulta, las cuales son luego enviadas como saltos de línea HTTP en el objetivo de la solicitud. Esto permite la inyección de encabezados HTTP arbitrarios o la división de la solicitud HTTP.\n\nEste problema afecta a hackney: desde 0 antes de 4.0.1.","source":"nvd"}],"published":"2026-05-25T14:00:45.781Z","modified":"2026-11-25T17:23:12.774Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N","score":6.8,"rating":"MEDIUM"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N","score":6.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N","rating":"MEDIUM"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:N/VI:H/VA:N/SC:N/SI:H/SA:N"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-93"],"affected":[{"ranges":[{"type":"semver","introduced":"0.1.0","fixed":"4.0.1","status":"affected"}],"vendor":"benoitc","product":"hackney","package":"hackney","cpe":"cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*","repo":"https://github.com/benoitc/hackney","source":"cvelist"},{"ranges":[{"type":"git","introduced":"8bb1a359a81ae58567c84f8d24564e9742e6f2bd","fixed":"ca73dd0aba0ed557449c18288bf07241671a43c9","status":"affected"}],"vendor":"benoitc","product":"hackney","package":"benoitc/hackney","cpe":"cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*","repo":"https://github.com/benoitc/hackney","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.0.1"}],"ecosystem":"Hex","package":"hackney","purl":"pkg:hex/hackney","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.1.0","status":"affected","fixed":"4.0.1"}],"ecosystem":"Hex","package":"hackney","purl":"pkg:hex/hackney","source":"eef"},{"ranges":[{"type":"git","introduced":"8bb1a359a81ae58567c84f8d24564e9742e6f2bd","status":"affected","fixed":"ca73dd0aba0ed557449c18288bf07241671a43c9"}],"repo":"https://github.com/benoitc/hackney","source":"eef"},{"ranges":[{"status":"affected","fixed":"4.0.1"}],"vendor":"benoitc","product":"hackney","cpe":"cpe:2.3:a:benoitc:hackney:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/benoitc/hackney/security/advisories/GHSA-j9wq-vxxc-94wf","tags":["advisory","exploit","patch","related","vendor-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-47075.html","tags":["patch","related","third-party-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-47075","tags":["patch","related","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/benoitc/hackney/commit/8bb1a359a81ae58567c84f8d24564e9742e6f2bd","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/benoitc/hackney/commit/ca73dd0aba0ed557449c18288bf07241671a43c9","tags":["fix","patch","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47075","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/benoitc/hackney","tags":["package"],"sources":["ghsa"]},{"url":"https://hex.pm/packages/hackney","tags":["package"],"sources":["eef"]}],"credits":["tepel-chen","Jonatan Männchen / EEF","Benoit Chesneau"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-05-26T15:50:04.477Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-47075","url":"https://www.cve.org/CVERecord?id=CVE-2026-47075","licence":"CVE Terms of Use","modified":"2026-11-20T08:18:15.260Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-j9wq-vxxc-94wf","url":"https://github.com/advisories/GHSA-j9wq-vxxc-94wf","licence":"CC-BY-4.0","modified":"2026-06-26T22:00:10.561Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-47075","url":"https://osv.dev/vulnerability/EEF-CVE-2026-47075","licence":"CC-BY-4.0","modified":"2026-11-25T17:23:12.774Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-47075","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47075","licence":"Public domain","modified":"2026-11-20T09:20:10.607Z"}],"updatedAt":"2026-11-25T22:59:22.277Z","epss":{"score":0.00479,"percentile":0.4297,"date":"2026-12-01T12:00:22.000Z"}}