Skip to main content

Java CVE-2026-35515

MEDIUM
Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') (CWE-74)
2026-04-06 https://github.com/nestjs/nest GHSA-36xv-jgw5-4q75
6.3
CVSS 4.0 · Vendor: https://github.com/nestjs/nest
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Input neutralization, injection prevention
Impact

The real-world risk is moderate to high depending on application design. Attack vector is network-based and requires low complexity; however, the attack precondition is strict: the developer must explicitly map user-influenced data (from request parameters, database fields, or other upstream sources) to the type or id fields of SSE messages. Direct HTTP request input does not automatically reach these fields without a developer-introduced data flow. CVSS vector is not provided, but the vulnerability is classified as CWE-74 improper output neutralization. EPSS score and KEV (CISA Known Exploited Vulnerabilities) status are not available in the provided data, suggesting this is a newly disclosed vulnerability without confirmed active exploitation. A public patch exists and is available (v11.1.18), lowering urgency. The impact surfaces as protocol-level injection rather than code execution, constraining the damage model to event spoofing, XSS if client-side rendering is unsafe, and session state corruption. Organizations using NestJS SSE endpoints should prioritize patching based on whether their applications map external data to SSE message type/id fields.

Exploit ScenarioDerived

An attacker identifies a NestJS application that streams server-sent events to clients, where the SSE message type or id is derived from a database field or query parameter controlled by user input. The attacker supplies a malicious value such as 'user-event\n\ndata: {"malicious": true}\n\n' in a field that the application maps to message.type. When the server constructs the SSE stream, the injected newline breaks the protocol structure, causing the client's EventSource to parse additional spurious events or corrupt its internal state. If the client renders SSE data as HTML (e.g., updating a DOM element with message content), the injected data could trigger XSS. No public exploit code is referenced in the provided data, and no CISA KEV listing or active exploitation confirmation is available at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 06, 2026

NestJS Core's Server-Sent Events (SSE) stream handler fails to sanitize newline characters in message type and ID fields, allowing remote attackers to inject arbitrary SSE events, spoof event types, and corrupt client reconnection state. Affected versions prior to @nestjs/core@11.1.18 are vulnerable when developers map user-controlled data to SSE message type or id fields. This mirrors a vulnerability patched in Spring Framework and can lead to event spoofing, data injection with XSS potential, and reconnection state corruption if client applications render SSE data without additional sanitization.

RemediationAI

Upgrade @nestjs/core to version 11.1.18 or later. This patched version sanitizes newline characters in message.type and message.id fields before interpolating them into SSE output. Users should update their package.json dependency and run npm install (or equivalent for yarn/pnpm). The patch is available via npm and GitHub release v11.1.18 at https://github.com/nestjs/nest/releases/tag/v11.1.18. The upstream fix is detailed in pull request https://github.com/nestjs/nest/pull/16686 and commit 83558ae774a990a7916141d3abe0b6548ff3a8b2. As a temporary mitigation for applications that cannot update immediately, developers should implement custom validation to reject or escape newline characters in any user-supplied data before assigning it to SSE message type or id fields.

Affected Packages

npm @nestjs/core fix: 11.1.18

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

NestJS Core's SseStream._transform() method directly interpolates the message.type and message.id fields into Server-Sent Events text protocol output. The SSE protocol (RFC 9110 compatible) uses carriage returns (\r) and newlines (\n) as field delimiters and double newlines (\n\n) as event boundaries. When message.type or message.id contain newline characters, they break out of their intended field and create new fields or events in the protocol stream. The CWE-74 (Improper Neutralization of Special Elements in Output) classification reflects the lack of output encoding for protocol-specific delimiters. The npm package @nestjs/core provides the affected SseStream router component. This is functionally identical to the vulnerability patched in Spring Framework via commit 6e97587, which validates id and event fields to prevent protocol injection.

Know when Java gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/nestjs/nest) PRIMARY 6.3 MEDIUM
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
Red Hat 6.5 MEDIUM

Primary rating from Vendor (https://github.com/nestjs/nest).

CVSS VectorVendor: https://github.com/nestjs/nest

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
Low
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch released
Apr 06, 2026 - 19:00 nvd
Patch available
CVE Published
Apr 06, 2026 - 17:59 nvd
MEDIUM 6.3

DescriptionCVE.org

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

Threat Intelligence Overview

EPSS Score
0.0%
Top 97% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

Affected Products (CPE)CVE.org

pkg:npm/@nestjs_core

More in Java

View all
CVE-2012-4681 CRITICAL POC
9.8 Aug 28

Oracle Java SE 7 Update 6 and earlier contains multiple sandbox bypass vulnerabilities via the ClassFinder and forName m

CVE-2015-7450 CRITICAL POC
9.8 Jan 02

Remote code execution in IBM Sterling B2B Integrator, Sterling Integrator, and Tivoli Common Reporting allows unauthenti

CVE-2013-2465 CRITICAL POC
9.8 Jun 18

Java Runtime Environment sandbox bypass via incorrect image channel verification in 2D component allows remote unauthent

CVE-2011-3544 CRITICAL POC
9.8 Oct 19

Oracle Java SE JDK/JRE 7 and 6 Update 27 and earlier allows remote code execution with complete system compromise throug

CVE-2010-1871 HIGH POC
8.8 Aug 05

JBoss Seam 2 in Red Hat JBoss EAP 4.3.0 fails to sanitize JBoss Expression Language inputs, allowing remote attackers to

CVE-2012-1723 CRITICAL POC
9.8 Jun 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 update 4 and earlier, 6 up

CVE-2013-0422 CRITICAL POC
9.8 Jan 10

Multiple vulnerabilities in Oracle Java 7 before Update 11 allow remote attackers to execute arbitrary code by (1) using

CVE-2012-0507 CRITICAL POC
9.8 Jun 07

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 2 and earlier, 6 Up

CVE-2015-4852 CRITICAL POC
9.8 Nov 18

The WLS Security component in Oracle WebLogic Server 10.3.6.0, 12.1.2.0, 12.1.3.0, and 12.2.1.0 allows remote attackers

CVE-2012-5076 CRITICAL POC
9.8 Oct 16

Unspecified vulnerability in the Java Runtime Environment (JRE) component in Oracle Java SE 7 Update 7 and earlier allow

CVE-2017-3066 CRITICAL POC
9.8 Apr 27

Remote unauthenticated attackers can execute arbitrary code on Adobe ColdFusion servers through Java deserialization fla

CVE-2012-0391 CRITICAL POC
9.8 Jan 08

The ExceptionDelegator component in Apache Struts before 2.2.3.1 interprets parameter values as OGNL expressions during

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy