6.3medium
@nestjs/core Improperly Neutralizes Special Elements in Output Used by a Downstream Component ('Injection')
- Severity
- 6.3medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.26% (higher than 18% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-36xv-jgw5-4q75
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| nestjs nest | < 11.1.18, before 11.1.18 | CVE List, NVD |
| @nestjs/core (npm) | before 11.1.18 | GitHub Advisory Database |
All scores
| GitHub_M | 6.3medium CVSS:4.0 | 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 |
| GitHub | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:L |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:L |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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, \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. Spring Framework's own security patch (6e97587) validates these same fields (id, event) for the same reason.
Actual impact:
- Event spoofing: Attacker forges SSE events with arbitrary
event:types, causing client-sideEventSource.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 theLast-Event-IDheader on reconnection, causing the client to miss or replay events. - Attack precondition: Requires the developer to map user-influenced data to the
typeoridfields 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
NVD (es)
Nest es un framework para construir aplicaciones escalables de Node.js del lado del servidor. Antes de la versión 11.1.18, SseStream._transform() interpola message.type y message.id directamente en la salida del protocolo de texto de Server-Sent Events sin sanear los caracteres de nueva línea (\r, \n). Dado que el protocolo SSE trata tanto \r como \n como delimitadores de campo y \n\n como límites de evento, un atacante que pueda influir en estos campos a través de fuentes de datos ascendentes puede inyectar eventos SSE arbitrarios, suplantar tipos de eventos y corromper el estado de reconexión. Esta vulnerabilidad se corrige en la versión 11.1.18.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-35515 changed 2026-04-07 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-36xv-jgw5-4q75 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-35515 changed 2026-10-26 | Public domain |