GHSA-hv23-4qp7-8c8r

Suggest an improvement
Source
https://github.com/advisories/GHSA-hv23-4qp7-8c8r
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-hv23-4qp7-8c8r/GHSA-hv23-4qp7-8c8r.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-hv23-4qp7-8c8r
Aliases
Published
2026-05-11T21:31:34Z
Modified
2026-06-08T20:31:01Z
Severity
  • 4.0 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:L/A:N CVSS Calculator
  • 6.3 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
ninenines cowlib: Improper Neutralization of CRLF Sequences ('CRLF Injection') vulnerability allows SSE event splitting and injection via unvalidated field values
Details

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.

Database specific
{
    "cwe_ids":  [
        "CWE-93"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-05-18T16:47:11Z",
    "nvd_published_at":  "2026-05-11T19:16:25Z",
    "severity":  "MODERATE"
}
References

Affected packages

Hex / cowlib

Package

Name
cowlib
Purl
pkg:hex/cowlib

Affected ranges

Type
SEMVER
Events
Introduced
2.6.0
Fixed
2.16.1

Affected versions

2.*
2.6.0
2.7.0
2.7.1
2.7.2
2.7.3
2.8.0
2.9.0
2.9.1
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

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-hv23-4qp7-8c8r/GHSA-hv23-4qp7-8c8r.json"