GHSA-36xv-jgw5-4q75

Suggest an improvement
Source
https://github.com/advisories/GHSA-36xv-jgw5-4q75
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-36xv-jgw5-4q75/GHSA-36xv-jgw5-4q75.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-36xv-jgw5-4q75
Aliases
  • CVE-2026-35515
Related
Published
2026-04-06T17:59:51Z
Modified
2026-05-05T15:59:49.468925Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:L CVSS Calculator
  • 6.3 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
@nestjs/core Improperly Neutralizes Special Elements in Output Used by a Downstream Component ('Injection')
Details

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-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

Database specific
{
    "github_reviewed": true,
    "github_reviewed_at": "2026-04-06T17:59:51Z",
    "cwe_ids": [
        "CWE-74"
    ],
    "severity": "MODERATE",
    "nvd_published_at": "2026-04-07T16:16:27Z"
}
References

Affected packages

npm / @nestjs/core

Package

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
11.1.18

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/04/GHSA-36xv-jgw5-4q75/GHSA-36xv-jgw5-4q75.json"
last_known_affected_version_range
"<= 11.1.17"