{"id":"CVE-2026-43966","aliases":["CVE-2026-43966","GHSA-w4f7-4cxr-rv3c","EEF-CVE-2026-43966"],"related":[],"kind":"vulnerability","state":"published","title":"HTTP Response Splitting via Non-VCHAR Bytes in cow_http_struct_hd:escape_string/2","summary":"Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') vulnerability in ninenines cowlib allows HTTP response splitting via non-VCHAR bytes in structured-fields string values.\n\ncow_http_struct_hd:escape_string/2 in cowlib only escapes \\ and \", passing all other bytes through verbatim. This creates an encoder/decoder asymmetry: the matching parser accepts only printable ASCII (0x20–0x7E, excluding \" and \\), but the encoder emits any byte including CR and LF. An application that builds a structured HTTP header via cow_http_struct_hd:item/1 (or a higher-level wrapper such as cow_http_hd:wt_protocol/1) from attacker-controlled input can have \\r\\n injected into the serialized header value. Once on the wire, the injected CRLF terminates the current header and any following bytes are interpreted as a new header, enabling HTTP response splitting.\n\nThis issue affects cowlib: from 2.9.0 before 2.22.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') vulnerability in ninenines cowlib allows HTTP response splitting via non-VCHAR bytes in structured-fields string values.\n\ncow_http_struct_hd:escape_string/2 in cowlib only escapes \\ and \", passing all other bytes through verbatim. This creates an encoder/decoder asymmetry: the matching parser accepts only printable ASCII (0x20–0x7E, excluding \" and \\), but the encoder emits any byte including CR and LF. An application that builds a structured HTTP header via cow_http_struct_hd:item/1 (or a higher-level wrapper such as cow_http_hd:wt_protocol/1) from attacker-controlled input can have \\r\\n injected into the serialized header value. Once on the wire, the injected CRLF terminates the current header and any following bytes are interpreted as a new header, enabling HTTP response splitting.\n\nThis issue affects cowlib: from 2.9.0 before 2.22.0.","source":"cvelist"},{"lang":"en","text":"Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') vulnerability in ninenines cowlib allows HTTP response splitting via non-VCHAR bytes in structured-fields string values.\n\ncow_http_struct_hd:escape_string/2 in cowlib only escapes \\ and \", passing all other bytes through verbatim. This creates an encoder/decoder asymmetry: the matching parser accepts only printable ASCII (0x20–0x7E, excluding \" and \\), but the encoder emits any byte including CR and LF. An application that builds a structured HTTP header via cow_http_struct_hd:item/1 (or a higher-level wrapper such as cow_http_hd:wt_protocol/1) from attacker-controlled input can have \\r\\n injected into the serialized header value. Once on the wire, the injected CRLF terminates the current header and any following bytes are interpreted as a new header, enabling HTTP response splitting.\n\nThis issue affects cowlib from 2.9.0.","format":"markdown","source":"ghsa"},{"lang":"en","text":"## Summary\n\nImproper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting') vulnerability in ninenines cowlib allows HTTP response splitting via non-VCHAR bytes in structured-fields string values.\n\n`cow_http_struct_hd:escape_string/2` in cowlib only escapes `\\` and `\"`, passing all other bytes through verbatim. This creates an encoder/decoder asymmetry: the matching parser accepts only printable ASCII (0x20–0x7E, excluding `\"` and `\\`), but the encoder emits any byte including CR and LF. An application that builds a structured HTTP header via `cow_http_struct_hd:item/1` (or a higher-level wrapper such as `cow_http_hd:wt_protocol/1`) from attacker-controlled input can have `\\r\\n` injected into the serialized header value. Once on the wire, the injected CRLF terminates the current header and any following bytes are interpreted as a new header, enabling HTTP response splitting.\n\nThis issue affects cowlib: from 2.9.0 before 2.22.0.\n\n## Workarounds\n\nValidate all values passed into structured-fields header builders (directly via `cow_http_struct_hd:item/1` or indirectly via higher-level wrappers) before calling the encoder. Reject any value that is not from a trusted, application-controlled source or that contains CR (`\\r`) or LF (`\\n`) bytes.\n\nApplications using cowboy 2.16.0 or later are protected on the server side by the `invalid_response_headers` option (defaults to `error_terminate`), which rejects any outgoing response header value containing CR or LF before it reaches the wire. Applications using gun 2.4.0 or later are protected on the client side by the `invalid_request_headers` request option (defaults to `raise`), which raises an exception when an outgoing request header value contains CR or LF.\n\n## Configurations\n\nThe application must pass attacker-controlled data as a string value into `cow_http_struct_hd:item/1` (or a wrapper that delegates to it). Applications that construct structured-fields header values exclusively from trusted, application-controlled values are not affected.","format":"markdown","source":"eef"},{"lang":"es","text":"La vulnerabilidad de Neutralización Incorrecta de Secuencias CRLF en Encabezados HTTP ('División de Solicitud/Respuesta HTTP') en ninenines cowlib permite la división de respuesta HTTP a través de bytes no VCHAR en valores de cadena de campos estructurados.\n\ncow_http_struct_hd:escape_string/2 en cowlib solo escapa \\ y \", pasando todos los demás bytes textualmente. Esto crea una asimetría de codificador/decodificador: el analizador coincidente acepta solo ASCII imprimible (0x20-0x7E, excluyendo \" y \\), pero el codificador emite cualquier byte, incluidos CR y LF. Una aplicación que construye un encabezado HTTP estructurado a través de cow_http_struct_hd:item/1 (o un envoltorio de nivel superior como cow_http_hd:wt_protocol/1) desde una entrada controlada por el atacante puede tener \\r\\n inyectado en el valor del encabezado serializado. Una vez en la red, el CRLF inyectado termina el encabezado actual y cualquier byte siguiente se interpreta como un nuevo encabezado, lo que permite la división de respuesta HTTP.\n\nEste problema afecta a cowlib desde la versión 2.9.0.","source":"nvd"}],"published":"2026-06-08T16:34:33.364Z","modified":"2026-11-25T17:23:02.984Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","rating":"MEDIUM"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/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:L/A:N","score":5.3,"rating":"MEDIUM"}],"cwes":["CWE-113"],"affected":[{"ranges":[{"type":"semver","introduced":"2.9.0","fixed":"2.22.0","status":"affected"}],"vendor":"ninenines","product":"cowlib","package":"cowlib","cpe":"cpe:2.3:a:ninenines:cowlib:*:*:*:*:*:*:*:*","repo":"https://github.com/ninenines/cowlib","source":"cvelist"},{"ranges":[{"type":"git","introduced":"a8b793db3d6ffe91d62f81baf41b1dab4cd78fb6","fixed":"4401b858f2229abb3ea115c60924f6c77e5f8aa3","status":"affected"}],"vendor":"ninenines","product":"cowlib","package":"ninenines/cowlib","cpe":"cpe:2.3:a:ninenines:cowlib:*:*:*:*:*:*:*:*","repo":"https://github.com/ninenines/cowlib","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.16.0"}],"ecosystem":"Hex","package":"cowboy","purl":"pkg:hex/cowboy","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.4.0"}],"ecosystem":"Hex","package":"gun","purl":"pkg:hex/gun","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"2.9.0","status":"affected","fixed":"2.22.0"}],"ecosystem":"Hex","package":"cowlib","purl":"pkg:hex/cowlib","source":"eef"},{"ranges":[{"type":"git","introduced":"a8b793db3d6ffe91d62f81baf41b1dab4cd78fb6","status":"affected","fixed":"4401b858f2229abb3ea115c60924f6c77e5f8aa3"}],"repo":"https://github.com/ninenines/cowlib","source":"eef"},{"ranges":[{"status":"affected","introduced":"2.9.0","fixed":"2.16.0"}],"vendor":"ninenines","product":"cowlib","cpe":"cpe:2.3:a:ninenines:cowlib:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/ninenines/cowboy/commit/f77cb9b5e730e300fffb551db1ba5d1c4ed878ef","tags":["mitigation","patch","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-43966.html","tags":["related","third-party-advisory","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-43966","tags":["related","third-party-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ninenines/gun/commit/4f35609eb37109b106a863fc9ba83d7ee64e3e42","tags":["mitigation","patch","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://github.com/ninenines/cowlib/commit/a8b793db3d6ffe91d62f81baf41b1dab4cd78fb6","tags":["related","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://github.com/ninenines/cowlib/commit/4401b858f2229abb3ea115c60924f6c77e5f8aa3","tags":["fix","patch","web"],"sources":["cvelist","ghsa","eef","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43966","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ninenines/cowlib/pull/163#issuecomment-4952645232","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ninenines/cowlib/pull/166#issuecomment-5067554701","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ninenines/cowlib","tags":["package"],"sources":["ghsa"]},{"url":"https://hex.pm/packages/cowlib","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF","Loïc Hoguin"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-08T18:37:59.853Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-43966","url":"https://www.cve.org/CVERecord?id=CVE-2026-43966","licence":"CVE Terms of Use","modified":"2026-11-19T08:18:38.614Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-w4f7-4cxr-rv3c","url":"https://github.com/advisories/GHSA-w4f7-4cxr-rv3c","licence":"CC-BY-4.0","modified":"2026-11-12T16:45:06.569Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-43966","url":"https://osv.dev/vulnerability/EEF-CVE-2026-43966","licence":"CC-BY-4.0","modified":"2026-11-25T17:23:02.984Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-43966","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43966","licence":"Public domain","modified":"2026-11-09T16:17:33.340Z"}],"updatedAt":"2026-11-25T22:59:23.999Z","epss":{"score":0.00324,"percentile":0.27485,"date":"2026-12-01T12:00:22.000Z"}}