CVE-2026-43968
Received Received - Intake
CRLF Injection in cowlib

Publication date: 2026-05-11

Last updated on: 2026-05-11

Assigner: EEF

Description
Improper Neutralization of CRLF Sequences ('CRLF Injection') vulnerability in ninenines cowlib allows SSE event splitting and injection via unvalidated field values. 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. This issue affects cowlib from 2.6.0.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-05-11
Last Modified
2026-05-11
Generated
2026-05-11
AI Q&A
2026-05-11
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
ninenines cowlib 2.6.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-93 The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2026-43968 is a CRLF injection vulnerability in the ninenines cowlib library affecting the Server-Sent Events (SSE) encoder. The vulnerability arises because the cow_sse:event/1 function improperly validates the id and event fields by guarding against newline characters (\n) but not against bare carriage return characters (\r). Additionally, the prefix_lines/2 function used for data and comment fields only splits on \n, ignoring the SSE specification which treats \r\n, \r, and \n as equivalent line terminators.

An attacker who controls any of these fields can inject additional SSE lines and forge complete events with arbitrary event types and data payloads. This enables event splitting, client-side logic manipulation, and stored-XSS-equivalent behavior when event data is inserted into the DOM.


How can this vulnerability impact me? :

This vulnerability can impact you by allowing an attacker to inject additional SSE lines and forge complete events with arbitrary event types and data payloads. In typical deployments where browser EventSource clients or other SSE consumers dispatch on event.type and render event.data, this can lead to event splitting and manipulation of client-side logic.

Such manipulation can result in stored cross-site scripting (XSS)-equivalent behavior, potentially allowing attackers to execute malicious scripts in the context of the victim's browser when event data is inserted into the DOM.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability involves injection of carriage return characters (\r) in SSE fields that can lead to event splitting and client-side logic manipulation.

To detect this vulnerability on your network or system, you can monitor SSE traffic for suspicious or unexpected carriage return characters (\r) in the id, event, data, or comment fields of Server-Sent Events.

A practical approach is to capture SSE traffic using tools like tcpdump or Wireshark and then search for CRLF injection patterns.

  • Use tcpdump to capture SSE traffic on the relevant port (e.g., port 80 or 443): tcpdump -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
  • Filter captured traffic for SSE event fields containing carriage return characters: grep -P '\r' captured_sse_traffic.txt
  • Alternatively, use curl or a browser developer tool to inspect SSE responses and look for unexpected \r characters in event fields.

Note that the vulnerability specifically allows injection via unvalidated \r characters that bypass existing \n checks, so detection should focus on identifying these characters in SSE fields.


What immediate steps should I take to mitigate this vulnerability?

To mitigate this vulnerability, you should sanitize all user-controlled values before passing them to the cow_sse:event/1 function.

  • Reject or strip any carriage return (\r) or newline (\n) characters from the id, event, data, and comment fields.
  • Ensure that all SSE field values are derived exclusively from trusted, application-controlled data.

Additionally, update cowlib to a version that includes the patch which properly handles different line endings (\r\n, \r, and \n) in accordance with the SSE specification.

This patch improves the internal functions to prevent injection by recognizing and properly handling all line terminators.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

The provided information does not explicitly address how this vulnerability affects compliance with common standards and regulations such as GDPR or HIPAA.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart