@nestjs/core
Affected
- introduced
0, fixed11.1.18(semver)
Fixed versions
11.1.18
Fix
- Fixed version
11.1.18npm install @nestjs/[email protected]
Advisory
Also known as: CVE-2026-35515
@nestjs/core Improperly Neutralizes Special Elements in Output Used by a Downstream Component ('Injection')
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: types, causing client-side EventSource.addEventListener() callbacks to fire for wrong event types.data: payloads, potentially triggering XSS if the client renders SSE data as HTML without sanitization.id: fields, corrupting the Last-Event-ID header on reconnection, causing the client to miss or replay events.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/[email protected]
Medium Basis: The source's own band: MODERATE
0, fixed 11.1.18 (semver)11.1.18
11.1.18npm install @nestjs/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0