Description
Nest is a framework for building scalable Node.js server-side applications. Prior to 11.1.18, SseStream._transform() interpolates message.type and message.id directly into Server-Sent Events text protocol output without sanitizing newline characters (\r, \n). Since the SSE protocol treats both \r and \n as field delimiters and \n\n 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. This vulnerability is fixed in 11.1.18.
Published: 2026-04-07
Score: 6.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Injection via Server‑Sent Events
Action: Patch
AI Analysis

Impact

The vulnerability stems from an omission of sanitization in the SSE output handling of NestJS’s SseStream._transform() method. Newline characters and are introduced directly from message.type and message.id fields into the Server‑Sent Events protocol stream. Because the SSE specification interprets these characters as delimiters and as event boundaries, an attacker who can control these fields can inject whole SSE events, manipulate event types, and corrupt the client’s reconnection logic. This leads to arbitrary event injection and potential disruption of application state, representing an injection flaw (CWE‑74).

Affected Systems

This issue affects the NestJS framework (nestjs:nest) in all releases prior to 11.1.18. Version 11.1.18 and later contain a patch that sanitizes the relevant fields, eliminating the injection vector.

Risk and Exploitability

The vulnerability has a CVSS score of 6.3, indicating a moderate severity. EPSS is not available, and it is not listed in the CISA KEV catalog, suggesting no widely known exploits at present. The attack requires an attacker who can influence the message.type or message.id values supplied to SSE streams, which may be achievable through upstream data sources. If exploited, an attacker could deliver malicious SSE events to clients, corrupt reconnection sequences, and potentially manipulate client‐side application logic. Overall, the risk is moderate, but it should be mitigated promptly to prevent future exploitation.

Generated by OpenCVE AI on April 7, 2026 at 22:49 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade NestJS to version 11.1.18 or later.
  • Validate or sanitize any user‑supplied data that populates message.type or message.id before passing it to SseStream._transform().

Generated by OpenCVE AI on April 7, 2026 at 22:49 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-36xv-jgw5-4q75 @nestjs/core Improperly Neutralizes Special Elements in Output Used by a Downstream Component ('Injection')
History

Wed, 08 Apr 2026 20:15:00 +0000

Type Values Removed Values Added
First Time appeared Nestjs
Nestjs nest
Vendors & Products Nestjs
Nestjs nest

Tue, 07 Apr 2026 18:00:00 +0000

Type Values Removed Values Added
Description Nest is a framework for building scalable Node.js server-side applications. Prior to 11.1.18, SseStream._transform() interpolates message.type and message.id directly into Server-Sent Events text protocol output without sanitizing newline characters (\r, \n). Since the SSE protocol treats both \r and \n as field delimiters and \n\n 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. This vulnerability is fixed in 11.1.18.
Title @nestjs/core Improperly Neutralizes Special Elements in Output Used by a Downstream Component ('Injection')
Weaknesses CWE-74
References
Metrics cvssV4_0

{'score': 6.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:L/SA:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-04-07T15:58:37.067Z

Reserved: 2026-04-03T02:15:39.280Z

Link: CVE-2026-35515

cve-icon Vulnrichment

Updated: 2026-04-07T15:49:00.468Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-04-07T16:16:27.773

Modified: 2026-04-08T21:27:00.663

Link: CVE-2026-35515

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-04-08T19:48:29Z

Weaknesses