Angular: SSR XSS via Unescaped Content Across DocumentFragment Boundaries in Fallback Raw-Content Elements
### Summary An XSS vulnerability exists in `@angular/platform-server` during server-side rendering (SSR) HTML serialization when traversing ancestor tags across `` element boundaries. When an application renders untrusted user input within raw-text tags (``, `<style>`, `<script>`), comments, or text nodes inside a `<template>` that is nested within a fallback raw-content element (`<noscript>`, `<iframe>`, `<noembed>`, `<noframes>`), matching closing tags (e.g., `</noscript>`) are not escaped during HTML serialization. When rendered in a browser, this unescaped closing tag prematurely terminates the fallback container and executes trailing markup as active DOM elements. ### Technical Description In HTML5 parsing, fallback raw-content elements (`<noscript>`, `<iframe>`, `<noembed>`, `<noframes>`) place the browser's tokenizer into `RAWTEXT` mode. In this mode, inner content is parsed as literal text until an end tag matching the container tag name (e.g., `</noscript>`) is encountered. To prevent XSS breakout vectors during SSR serialization, the DOM serializer inspects a node's ancestors to escape any matching fallback closing tags (`</tag` -> `</tag`). However: 1. Per DOM specifications, the children of a `<template>` element reside in a separate `DocumentFragment` (`template.content`), whose own `parentNode` is `null`. 2. The serializer's ancestor traversal previously only inspected element nodes. When traversing upward from a node inside `template.content`, traversal term
GHSA-v3p8-whq6-r5jg
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-v3p8-whq6-r5jg
@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-v3p8-whq6-r5jg/GHSA-v3p8-whq6-r5jg.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-v3p8-whq6-r5jg/GHSA-v3p8-whq6-r5jg.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-v3p8-whq6-r5jg/GHSA-v3p8-whq6-r5jg.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-v3p8-whq6-r5jg/GHSA-v3p8-whq6-r5jg.json"
}
}
]- Related CVEs
- CVE-2026-88060
Source reference:
/aliases
Publisher severity
high
Source reference: /database_specific/severity
- Event
- #14930 · Revision 1
- Added to Heist Feed
- Publisher date