The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-43968

CVE-2026-43968: cowlib CRLF Injection XSS Vulnerability

CVE-2026-43968 is a CRLF injection vulnerability in cowlib that enables SSE event splitting and XSS attacks through unvalidated field values. This article covers the technical details, affected versions, and mitigation.

Published: May 18, 2026

CVE-2026-43968 Overview

CVE-2026-43968 is a CRLF injection vulnerability [CWE-93] in the cowlib library maintained by ninenines, used by the Cowboy HTTP server in the Erlang ecosystem. The flaw affects the cow_sse:event/1 function, which builds Server-Sent Events (SSE) frames. The function guards 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. Attackers controlling any SSE field value can inject additional event lines and forge complete events with arbitrary types and payloads. This affects cowlib versions from 2.6.0 before 2.16.1.

Critical Impact

Attackers can inject forged SSE events that browser EventSource consumers will dispatch and render, enabling client-side logic manipulation and stored-XSS-equivalent behaviour when event data reaches the DOM.

Affected Products

  • ninenines cowlib 2.6.0 through 2.16.0
  • Cowboy HTTP server deployments using vulnerable cowlib for SSE responses
  • Erlang/OTP applications consuming user-controlled values in cow_sse:event/1

Discovery Timeline

  • 2026-05-11 - CVE CVE-2026-43968 published to NVD
  • 2026-05-13 - Last updated in NVD database

Technical Details for CVE-2026-43968

Vulnerability Analysis

The SSE specification requires decoders to treat \r\n, \r, and \n as equivalent line terminators. The cow_sse:event/1 function in cowlib enforces only a subset of these terminators when validating field values. The event_id and event_event clauses reject \n but accept bare \r, while prefix_lines/2, which handles data and comment fields, splits exclusively on \n and passes \r through unchanged.

When an attacker injects a \r character into any controlled field, the receiving SSE parser interprets it as a new line. The attacker can then append event: and data: directives, producing a fully forged event with an arbitrary type and payload. Browser EventSource clients dispatch based on event.type and frequently insert event.data into the DOM, which converts the injection into client-side code execution paths.

Root Cause

The root cause is incomplete neutralization of line terminators in SSE field encoders. The validation logic checks only for \n and ignores the \r and \r\n sequences that the SSE specification mandates as equivalent. Field values originating from untrusted sources are concatenated directly into the response stream without normalization.

Attack Vector

Exploitation requires the application to pass attacker-influenced data into cow_sse:event/1 field values such as id, event, data, or comment. The attacker submits a value containing \r followed by SSE directives. The server emits the malformed frame to all subscribed clients, and each consumer parses the injected lines as a separate event.

text
 event_id(#{id := ID}) ->
-	nomatch = binary:match(iolist_to_binary(ID), <<"\n">>),
+	nomatch = binary:match(iolist_to_binary(ID),
+		[<<"\r\n">>, <<"\r">>, <<"\n">>]),
 	[<<"id: ">>, ID, $\n];
 event_id(_) ->
 	[].

Source: GitHub Commit 6165fc4. The patch extends binary:match/2 to reject all three line terminator forms across every SSE field encoder.

Detection Methods for CVE-2026-43968

Indicators of Compromise

  • SSE response bodies containing unexpected \r bytes inside id:, event:, or data: field values
  • Client-side telemetry showing dispatched event types that the application does not emit
  • Unexpected DOM mutations or script execution traced back to EventSource.onmessage or named event handlers

Detection Strategies

  • Inspect outbound SSE streams for \r characters appearing anywhere other than as part of a deliberate \r\n line terminator emitted by the server
  • Audit Erlang/Cowboy applications for calls to cow_sse:event/1 where field values originate from request parameters, headers, or database fields populated by users
  • Run dependency scanning against rebar.lock and mix.lock to identify cowlib versions earlier than 2.16.1

Monitoring Recommendations

  • Log SSE response payloads in non-production environments and alert on bare \r occurrences within field values
  • Capture browser-side error events from EventSource consumers to surface anomalous event types
  • Monitor web application firewall logs for request parameters containing URL-encoded %0D sequences targeting endpoints that produce SSE responses

How to Mitigate CVE-2026-43968

Immediate Actions Required

  • Upgrade cowlib to version 2.16.1 or later across all Erlang/Elixir applications
  • Rebuild and redeploy any release that statically links a vulnerable cowlib version
  • Audit application code that builds SSE events from user-supplied input and add explicit rejection of \r and \n characters

Patch Information

The fix is committed in cowlib commit 6165fc40efa159ba1cceee7e7981e790acba5d9c and shipped in version 2.16.1. The patch extends line-terminator validation across event_id, event_event, prefix_lines, and related encoders to reject \r\n, \r, and \n. Refer to the CNA CVE-2026-43968 Advisory and the OSV Vulnerability Report EEF-CVE-2026-43968 for full advisory details.

Workarounds

  • Sanitize all untrusted values before passing them to cow_sse:event/1 by stripping or rejecting \r and \n bytes
  • Apply output encoding on the client so that event.data is inserted using textContent rather than innerHTML
  • Restrict the set of event types the client dispatches by allow-listing handlers and ignoring unknown event names
bash
# Pin cowlib to the patched version in rebar.config
{deps, [
    {cowlib, "2.16.1"}
]}.

# Or in mix.exs for Elixir projects
# {:cowlib, "~> 2.16.1", override: true}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeXSS

  • Vendor/TechCowlib

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability0.06%

  • Known ExploitedNo
  • CVSS 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
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-93
  • Technical References
  • CNA CVE-2026-43968 Advisory

  • GitHub Commit Reference

  • OSV Vulnerability Report EEF-CVE-2026-43968
  • Related CVEs
  • CVE-2026-43970: Cowlib SPDY DoS Vulnerability

  • CVE-2026-43969: Cowlib Auth Bypass Vulnerability

  • CVE-2026-7790: Cowlib HTTP Parser DoS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English