{"id":"CVE-2026-43968","aliases":["EEF-CVE-2026-43968","GHSA-hv23-4qp7-8c8r"],"title":"CR Injection in SSE Encoder Enables Event Splitting via cow_sse:event/1","titleSource":"EEF","descriptionSource":"OSV","description":"## Summary\n\nImproper Neutralization of CRLF Sequences ('CRLF Injection') vulnerability in ninenines cowlib allows SSE event splitting and injection via unvalidated field values.\n\n`cow_sse:event/1` in cowlib guards the `id` and `event` fields against `\\n` but not against bare `\\r`, and the internal `prefix_lines/2` function used for `data` and `comment` fields splits only on `\\n`. Because the SSE specification requires decoders to treat `\\r\\n`, `\\r`, and `\\n` as equivalent line terminators, an attacker who controls any of these fields can inject additional SSE lines and forge a complete event with an arbitrary event type and data payload on the receiving end. In typical deployments where browser `EventSource` clients or other SSE consumers dispatch on `event.type` and render `event.data`, this enables event splitting, client-side logic manipulation, and stored-XSS-equivalent behaviour when event data is inserted into the DOM.\n\nThis issue affects cowlib: from 2.5.0 before 2.16.1.\n\n## Workarounds\n\nSanitize user-controlled values before passing them to `cow_sse:event/1`: reject or strip any value containing `\\r` or `\\n` characters in the `id`, `event`, `data`, and `comment` fields. Alternatively, ensure that all SSE field values are derived exclusively from trusted, application-controlled data rather than user input.\n\n## Configurations\n\nThe application must pass user-controlled data as the `id`, `event`, `data`, or `comment` field to `cow_sse:event/1` (or a higher-level wrapper such as `cowboy_req:stream_events/3`). Applications that construct SSE events exclusively from trusted, application-controlled values are not affected.","severity":"medium","score":6.3,"published":"2026-05-11T18:06:42.881Z","modified":"2026-11-25T17:23:07.098Z","withdrawn":false,"knownExploited":false,"affected":[{"ecosystem":"Hex","name":"cowlib","sources":[{"name":"OSV · EEF-CVE-2026-43968","url":"https://osv.dev/vulnerability/EEF-CVE-2026-43968"}],"ranges":[{"events":[{"introduced":"2.5.0"},{"fixed":"2.16.1"}],"type":"SEMVER"}],"versions":["2.10.0","2.10.1","2.11.0","2.12.0","2.12.1","2.13.0","2.14.0","2.15.0","2.16.0","2.5.0","2.5.1","2.6.0","2.7.0","2.7.1","2.7.2","2.7.3","2.8.0","2.9.0","2.9.1"],"fixed":["2.16.1"]}],"sourceAffected":[{"ranges":[{"events":[{"introduced":"93b2b897cde238506c803faad4d1602d79dba7c9"},{"fixed":"6165fc40efa159ba1cceee7e7981e790acba5d9c"}],"type":"GIT","repo":"https://github.com/ninenines/cowlib"}],"versions":["2.16.0","2.15.0","2.14.0","2.13.0","2.12.1","2.12.0","2.11.0","2.10.1","2.10.0","2.9.1","2.9.0","2.8.0","2.7.3","2.7.2","2.7.1","2.7.0","2.6.0","2.5.1","2.5.0"]}],"references":["https://cna.erlef.org/cves/CVE-2026-43968.html","https://osv.dev/vulnerability/EEF-CVE-2026-43968","https://github.com/ninenines/cowlib/commit/93b2b897cde238506c803faad4d1602d79dba7c9","https://github.com/ninenines/cowlib/commit/6165fc40efa159ba1cceee7e7981e790acba5d9c","https://hex.pm/packages/cowlib"],"sources":[{"name":"CVE","id":"CVE-2026-43968","modified":"2026-11-20T05:12:10.654Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-43968"},{"name":"OSV","id":"EEF-CVE-2026-43968","modified":"2026-11-25T17:23:07.098492071Z","url":"https://osv.dev/vulnerability/EEF-CVE-2026-43968"}],"assessments":[{"source":"EEF","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N","score":6.3},{"source":"OSV","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N","score":6.3}],"cve":{"records":[{"id":"CVE-2026-43968","source":"EEF","state":"PUBLISHED","reasons":[],"replacements":[],"disputed":false,"unsupportedWhenAssigned":false,"reserved":"2026-05-04T18:23:25.573Z","published":"2026-05-11T18:06:42.881Z","modified":"2026-11-20T05:12:10.654Z"}],"publishers":[{"name":"EEF","role":"CNA","organizationId":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","modified":"2026-11-20T05:12:10.654Z"},{"name":"CISA-ADP","role":"ADP","organizationId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","modified":"2026-05-11T18:57:38.074Z"}],"references":[{"url":"https://cna.erlef.org/cves/CVE-2026-43968.html","tags":["related","third-party-advisory"],"source":"EEF"},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-43968","tags":["related"],"source":"EEF"},{"url":"https://github.com/ninenines/cowlib/commit/93b2b897cde238506c803faad4d1602d79dba7c9","tags":["related"],"source":"EEF"},{"url":"https://github.com/ninenines/cowlib/commit/6165fc40efa159ba1cceee7e7981e790acba5d9c","tags":["patch"],"source":"EEF"}],"weaknesses":[{"id":"CWE-93","description":"CWE-93 Improper Neutralization of CRLF Sequences","source":"EEF"}],"applicability":[{"source":"EEF","statements":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:ninenines:cowlib:*:*:*:*:*:*:*:*","versionEndExcluding":"2.16.1","versionStartIncluding":"2.5.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"AND"}]}],"prioritization":[{"source":"CISA-ADP","type":"SSVC","role":"CISA Coordinator","timestamp":"2026-05-11T18:57:13.541982Z","decisions":[{"name":"Exploitation","value":"none"},{"name":"Automatable","value":"no"},{"name":"Technical Impact","value":"partial"}]}]},"products":[{"vendor":"ninenines","name":"cowlib","platforms":[],"versions":[{"version":"2.5.0","status":"affected","lessThan":"2.16.1","versionType":"semver"}],"defaultStatus":"unaffected","packageURL":"pkg:hex/cowlib","packageIdentity":{"ecosystem":"Hex","name":"cowlib"},"cpes":["cpe:2.3:a:ninenines:cowlib:*:*:*:*:*:*:*:*"],"source":"EEF","url":"https://www.cve.org/CVERecord?id=CVE-2026-43968"},{"vendor":"ninenines","name":"cowlib","platforms":[],"versions":[{"version":"93b2b897cde238506c803faad4d1602d79dba7c9","status":"affected","lessThan":"6165fc40efa159ba1cceee7e7981e790acba5d9c","versionType":"git"}],"defaultStatus":"unaffected","packageURL":"pkg:github/ninenines/cowlib","cpes":["cpe:2.3:a:ninenines:cowlib:*:*:*:*:*:*:*:*"],"source":"EEF","url":"https://www.cve.org/CVERecord?id=CVE-2026-43968"}],"remediation":[{"text":"Sanitize user-controlled values before passing them to cow_sse:event/1: reject or strip any value containing \\r or \\n characters in the id, event, data, and comment fields. Alternatively, ensure that all SSE field values are derived exclusively from trusted, application-controlled data rather than user input.","source":"EEF","url":"https://www.cve.org/CVERecord?id=CVE-2026-43968"}],"observedAt":"2026-11-25T18:38:22.558Z","kev":{"status":"unavailable","checkedAt":"2026-11-28T23:55:31.062Z"},"coverage":[{"source":"NVD","status":"available","checkedAt":"2026-11-21T01:55:33.613Z","attemptedAt":"2026-11-21T01:55:33.613Z"},{"source":"GHSA","status":"available","checkedAt":"2026-11-21T01:55:31.109Z","attemptedAt":"2026-11-21T01:55:31.109Z"},{"source":"EUVD","status":"available","checkedAt":"2026-11-21T01:45:35.479Z","attemptedAt":"2026-11-21T01:45:35.479Z"},{"source":"EPSS","status":"available","checkedAt":"2026-11-21T01:40:36.998Z","attemptedAt":"2026-11-21T01:40:36.998Z"}],"evidence":[{"source":"FIRST EPSS","id":"CVE-2026-43968","url":"https://www.first.org/epss/","probability":0.00275,"percentile":0.2032,"date":"2026-11-20","checkedAt":"2026-11-21T01:40:36.998Z"},{"source":"ENISA EUVD","id":"EUVD-2026-29192","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-29192","modified":"Nov 20, 2026, 5:12:10 AM","score":6.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N","checkedAt":"2026-11-21T01:45:35.479Z"},{"source":"GitHub Advisory Database","id":"GHSA-hv23-4qp7-8c8r","url":"https://github.com/advisories/GHSA-hv23-4qp7-8c8r","modified":"2026-06-08T20:16:52Z","score":4,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N","checkedAt":"2026-11-21T01:55:31.109Z"},{"source":"NVD","id":"CVE-2026-43968","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43968","modified":"2026-11-20T06:17:27.913","score":6.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","checkedAt":"2026-11-21T01:55:33.613Z"},{"source":"NVD","id":"CVE-2026-43968","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43968","modified":"2026-11-20T06:17:27.913","score":4,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N","checkedAt":"2026-11-21T01:55:33.613Z"}],"aiSummary":{"text":"The cowlib library, versions 2.5.0 before 2.16.1, has a CRLF injection vulnerability that allows an attacker to inject additional SSE lines and forge events. This occurs when user-controlled data is passed to `cow_sse:event/1` without proper sanitization. The impact includes event splitting and client-side logic manipulation.","model":"@cf/meta/llama-3.3-70b-instruct-fp8-fast","generatedAt":"2026-11-20T10:21:26.114Z","sources":[{"name":"CVE","url":"https://www.cve.org/CVERecord?id=CVE-2026-43968"},{"name":"OSV","url":"https://osv.dev/vulnerability/EEF-CVE-2026-43968"}]}}