eventsource-encoder encodes events as well-formed EventSource/Server Sent Event (SSE) messages. Prior to 1.0.2, eventsource-encoder does not sanitize the event or id fields of an EventSourceMessage before serializing them. An attacker who controls either field can inject arbitrary Server-Sent Events line terminators (\n, \r, or \r\n) and thereby forge additional SSE fields or entire messages on the stream. This vulnerability is fixed in 1.0.2.
eventsource-encoder versions before 1.0.2 fail to sanitize event and id fields, allowing attackers to inject arbitrary Server-Sent Events line terminators and forge additional SSE fields or messages. This vulnerability enables injection attacks that could manipulate event streams and compromise data integrity in applications using vulnerable versions.
تفشل مكتبة eventsource-encoder في الإصدارات السابقة للإصدار 1.0.2 في تنظيف حقول الأحداث والمعرفات قبل تسلسلها. يمكن لمهاجم يتحكم في أي من هذه الحقول حقن فواصل أسطر Server-Sent Events التعسفية وتزوير حقول SSE إضافية أو رسائل كاملة على التدفق. تم إصلاح هذه الثغرة في الإصدار 1.0.2.
إصدارات eventsource-encoder السابقة للإصدار 1.0.2 لا تقوم بتنظيف حقول الأحداث والمعرفات، مما يسمح للمهاجمين بحقن فواصل أسطر Server-Sent Events التعسفية وتزوير حقول SSE إضافية أو رسائل كاملة. يمكن لهذه الثغرة أن تمكن هجمات الحقن التي قد تؤثر على سلامة البيانات في التطبيقات التي تستخدم الإصدارات الضعيفة.
Upgrade eventsource-encoder to version 1.0.2 or later immediately. Review all applications using this library and apply the patch. Implement input validation and sanitization for event and id fields at the application level as an additional security measure.
قم بترقية eventsource-encoder إلى الإصدار 1.0.2 أو أحدث على الفور. راجع جميع التطبيقات التي تستخدم هذه المكتبة وطبق التصحيح. قم بتنفيذ التحقق من صحة الإدخال وتنظيف حقول الأحداث والمعرفات على مستوى التطبيق كإجراء أمان إضافي.