{"id":"CVE-2026-43966","published":"2026-06-08T16:34:33Z","modified":"2026-11-19T08:18:38Z","title":"HTTP Response Splitting via Non-VCHAR Bytes in cow_http_struct_hd:escape_string/2","vendor":"ninenines","product":"cowlib","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.3,"severity":"MEDIUM","version":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00259,"percentile":0.17888,"provenance":"source"},"cwes":[{"id":"CWE-113","name":"Improper Neutralization of CRLF Sequences in HTTP Headers"}],"references":[{"url":"https://github.com/ninenines/cowboy/commit/f77cb9b5e730e300fffb551db1ba5d1c4ed878ef","tags":["mitigation"]},{"url":"https://cna.erlef.org/cves/CVE-2026-43966.html","tags":["related","third-party-advisory"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-43966","tags":["related"]},{"url":"https://github.com/ninenines/gun/commit/4f35609eb37109b106a863fc9ba83d7ee64e3e42","tags":["mitigation"]},{"url":"https://github.com/ninenines/cowlib/commit/a8b793db3d6ffe91d62f81baf41b1dab4cd78fb6","tags":["related"]},{"url":"https://github.com/ninenines/cowlib/commit/4401b858f2229abb3ea115c60924f6c77e5f8aa3","tags":["patch"]}],"priority":{"score":8.0,"factors":[{"name":"EPSS percentile","points":3.58},{"name":"CVSS severity","points":4.41}]},"vendorSlug":"ninenines","affectedVersions":[{"vendor":"ninenines","product":"cowlib","versions":[">= 2.9.0, < 2.22.0"]},{"vendor":"ninenines","product":"cowlib","versions":[">= a8b793db3d6ffe91d62f81baf41b1dab4cd78fb6, < 4401b858f2229abb3ea115c60924f6c77e5f8aa3"]}],"workarounds":{"items":["Validate 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. Applications 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."],"from":"CVE.org CNA","provenance":"source"},"capec":[{"id":"CAPEC-34","name":"HTTP Response Splitting"}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-06-08T18:37:59.853576Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Hex","package":"cowboy","vulnerableRanges":["<2.16.0"],"patched":["2.16.0"],"from":["GHSA-w4f7-4cxr-rv3c"],"provenance":"source"},{"ecosystem":"Hex","package":"gun","vulnerableRanges":["<2.4.0"],"patched":["2.4.0"],"from":["GHSA-w4f7-4cxr-rv3c"],"provenance":"source"}],"summary":{"text":"The flaw is in the cow_http_struct_hd:escape_string/2 function of the cowlib library from ninenines, where only backslashes and double quotes are escaped and all other bytes, including CR and LF, are passed through unchanged when encoding structured HTTP header string values. An attacker who can supply input that an application places into a header built with cow_http_struct_hd:item/1 or a wrapper such as cow_http_hd:wt_protocol/1 can inject CRLF sequences over the network, enabling HTTP response splitting in cowlib 2.9.0 and later.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:12:15Z"},"euvd":{"id":"EUVD-2026-35131","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-8466","published":"2026-05-13","fixed":"2.15.0","kev":false,"link":{"from":"CVE-2026-8466","to":"CVE-2026-43966","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Hex:cowboy","fromFixed":"2.15.0","toFixed":"2.16.0","daysApart":26}]}},{"cve":"CVE-2026-43966","published":"2026-06-08","fixed":"2.16.0","kev":false}],"package":"Hex:cowboy"}}