Angular SSR: XSS via Unescaped Processing Instruction () Nodes in Fallback Raw-Content Elements
### Summary An XSS vulnerability exists in `@angular/platform-server` during server-side rendering (SSR) HTML serialization of `ProcessingInstruction` DOM nodes (``, `nodeType === 7`) when nested inside fallback raw-content elements (``). When rendered in a browser with scripting enabled, an unescaped closing tag sequence in a processing instruction prematurely closes the fallback raw-content tag and causes subsequent sibling elements to execute as live HTML. ### Technical Description In HTML5 parsing, fallback raw-content elements (``. ### Impact & Reachability * **Reachability**: Processing instruction nodes cannot be authored directly through standard Angular template syntax (which parses `` into comment nodes in DOM position). Reaching this vulnerability requires application or library code calling `inject(DOCUMENT).createProcessingInstruction(target, data)` or `Renderer2` DOM insertion methods with untrusted user input passed to `data` inside a fallback raw-content container. * **Impact**: In applications that programmatically construct processing instruction nodes inside fallback elements during server-side rendering, an attacker controlling the processing instruction data can break out of the container and execute arbitrary JavaScript in victims' browsers. ### Proof of Concept (Minimal Reproduction) ```ts import { Component, ElementRef, Renderer2, inject, DOCUMENT, AfterViewInit } from '@angular/core'; @Component({ selector: 'app-root', standalone: true, template: `` }
GHSA-j3r3-mxqp-r2p4
Primary source · Revision 1
Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.
Security context
Source reference: osv:GHSA-j3r3-mxqp-r2p4
@angular/platform-server
Source reference: /affected/0/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 22.1.4
Source reference:
/affected/0/ranges - Prerequisites
- Not stated in this record
@angular/platform-server
Source reference: /affected/1/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 21.2.22
Source reference:
/affected/1/ranges - Prerequisites
- Not stated in this record
@angular/platform-server
Source reference: /affected/2/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- 20.3.30
Source reference:
/affected/2/ranges - Prerequisites
- Not stated in this record
@angular/platform-server
Source reference: /affected/3/package/name
- Affected versions
- Not stated in this record
- Fixed versions
- Not stated in this record
- Prerequisites
- Not stated in this record
Structured affected-version data
Original package identities and version rules from this source.
[
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "22.0.0"
},
{
"fixed": "22.1.4"
}
]
}
],
"package": {
"name": "@angular/platform-server",
"purl": "pkg:npm/%40angular/platform-server",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-j3r3-mxqp-r2p4/GHSA-j3r3-mxqp-r2p4.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "21.0.0"
},
{
"fixed": "21.2.22"
}
]
}
],
"package": {
"name": "@angular/platform-server",
"purl": "pkg:npm/%40angular/platform-server",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-j3r3-mxqp-r2p4/GHSA-j3r3-mxqp-r2p4.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "20.0.0"
},
{
"fixed": "20.3.30"
}
]
}
],
"package": {
"name": "@angular/platform-server",
"purl": "pkg:npm/%40angular/platform-server",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-j3r3-mxqp-r2p4/GHSA-j3r3-mxqp-r2p4.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"last_affected": "19.2.25"
}
]
}
],
"package": {
"name": "@angular/platform-server",
"purl": "pkg:npm/%40angular/platform-server",
"ecosystem": "npm"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-j3r3-mxqp-r2p4/GHSA-j3r3-mxqp-r2p4.json"
}
}
]- Related CVEs
- CVE-2026-88058
Source reference:
/aliases
Publisher severity
high
Source reference: /database_specific/severity
- Event
- #23641 · Revision 1
- Added to Heist Feed
- Publisher date