PT-2026-39241 · Npm+1 · Eventsource-Encoder
Rexxars
·
Published
2026-05-08
·
Updated
2026-05-26
·
CVE-2026-44214
CVSS v3.1
5.8
Medium
| Vector | AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N |
Name of the Vulnerable Software and Affected Versions
eventsource-encoder versions prior to 1.0.2
Description
The software fails to sanitize the
event and id fields of an EventSourceMessage before serialization in the encodeMessage() function. An attacker who controls these fields can inject Server-Sent Events (SSE) line terminators ( , r, or r ), allowing them to forge additional SSE fields or entire messages on the stream. This can lead to spoofing events of arbitrary types, injecting fields such as data:, id:, or retry:, splitting a single encoding call into multiple browser events, or overriding the client's Last-Event-ID.Recommendations
Update to version 1.0.2.
As a temporary workaround, validate or strip line terminators from any untrusted value before passing it to the
encode or encodeMessage() functions.Exploit
Fix
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Eventsource-Encoder