PT-2026-30760 · Npm · @Nestjs/Core

Published

2026-04-06

·

Updated

2026-04-06

·

CVE-2026-35515

CVSS v4.0

6.3

Medium

AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:L/SA:N

Impact

What kind of vulnerability is it? Who is impacted?
SseStream. transform() interpolates message.type and message.id directly into Server-Sent Events text protocol output without sanitizing newline characters (r, ). Since the SSE protocol treats both r and as field delimiters and `
as event boundaries, an attacker who can influence these fields through upstream data sources can inject arbitrary SSE events, spoof event types, and corrupt reconnection state. Spring Framework's own security patch ([6e97587](https://github.com/spring-projects/spring-framework/commit/6e9758700a4946be1dca85ca937ef2603e291301)) validates these same fields (id, event`) for the same reason.
Actual impact:
  • Event spoofing: Attacker forges SSE events with arbitrary event: types, causing client-side EventSource.addEventListener() callbacks to fire for wrong event types.
  • Data injection: Attacker injects arbitrary data: payloads, potentially triggering XSS if the client renders SSE data as HTML without sanitization.
  • Reconnection corruption: Attacker injects id: fields, corrupting the Last-Event-ID header on reconnection, causing the client to miss or replay events.
  • Attack precondition: Requires the developer to map user-influenced data to the type or id fields of SSE messages. Direct HTTP request input does not reach these fields without developer code bridging the gap.

Patches

Has the problem been patched? What versions should users upgrade to?
Patched in @nestjs/core@11.1.18

Fix

Special Elements Injection

Weakness Enumeration

Related Identifiers

CVE-2026-35515
GHSA-36XV-JGW5-4Q75

Affected Products

@Nestjs/Core