CVE-2026-88058 — Vulnerability in @angular/platform-server
Angular SSR: XSS via Unescaped Processing Instruction (<?...?>) Nodes in Fallback Raw-Content Elements
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.50%). Schedule for your next planned update.
Does your project use an affected @angular/platform-server version?
Paste your package-lock.json to check it for CVE-2026-88058 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
An XSS vulnerability exists in @angular/platform-server during server-side rendering (SSR) HTML serialization of ProcessingInstruction DOM nodes (<?target data?>, nodeType === 7) when nested inside fallback raw-content elements (<noscript>, <iframe>, <noembed>, <noframes>). While processing instruction data escaped > to >, it did not check for or escape matching closing tags of ancestor fallback elements (e.g., </noscript>). 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 (<noscript>, <iframe>, <noembed>, <noframes>) place the browser's HTML tokenizer into RAWTEXT mode. In RAWTEXT mode, processing instruction tokens (<?...?>) are treated as literal raw text rather than bogus comments, and the parser ignores > or ?>. The only token sequence that terminates the container is an end tag matching the container tag name (</noscript, </iframe, etc.).
During server-side HTML serialization, processing instruction nodes previously only replaced > with > (preventing bogus comment breakouts in normal HTML data states) but left < untouched. Crucially, processing instruction serialization never inspected ancestor fallback raw-content tags. As a result, if a ProcessingInstruction node inside <noscript> contained </noscript in its data payload, it was emitted unescaped as <?x </noscript ?>.
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 callinginject(DOCUMENT).createProcessingInstruction(target, data)orRenderer2DOM insertion methods with untrusted user input passed todatainside 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)
import { Component, ElementRef, Renderer2, inject, DOCUMENT, AfterViewInit } from '@angular/core';
@Component({
selector: 'app-root',
standalone: true,
template: `<noscript id="host"></noscript>`
})
export class AppComponent implements AfterViewInit {
private r = inject(Renderer2);
private el = inject(ElementRef);
private doc = inject(DOCUMENT);
ngAfterViewInit() {
const host = this.el.nativeElement.querySelector('#host');
// Attacker-controlled input passed as Processing Instruction data
const pi = this.doc.createProcessingInstruction('x', '</noscript ');
this.r.appendChild(host, pi);
// Sibling markup that should remain inert inside <noscript>
const img = this.r.createElement('img');
this.r.setAttribute(img, 'src', 'x');
this.r.setAttribute(img, 'onerror', 'alert("SSR_PI_XSS")');
this.r.appendChild(host, img);
}
}
Vulnerable SSR Output:
<noscript><?x </noscript ?><img src="x" onerror="alert('SSR_PI_XSS')"></noscript>
Workarounds
- Avoid passing untrusted user input into
document.createProcessingInstruction(target, data)when the node is inserted into<noscript>,<iframe>,<noembed>, or<noframes>during server-side rendering. - Manually sanitize or replace
<with<in any untrusted data passed to processing instruction nodes on the server.
Advisory Timeline
- First published September 28, 2026 (59 days ago).
- Last revised September 28, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install @angular/platform-server@20.3.30
npm install @angular/platform-server@21.2.22
npm install @angular/platform-server@22.1.4
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (4)
Affects 1 ecosystem: npm (1).
| Package | Fixed In |
|---|---|
| @angular/platform-server npm · Affected: All versions | 20.3.30 |
| @angular/platform-server npm · Affected: All versions | Range-based data available |
| @angular/platform-server npm · Affected: All versions | 21.2.22 |
| @angular/platform-server npm · Affected: All versions | 22.1.4 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 8.1 score means for each attack dimension.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N
References
- https://github.com/angular/angular/security/advisories/GHSA-j3r3-mxqp-r2p4WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-88058ADVISORY
- https://github.com/angular/angular/issues/70146WEB
- https://github.com/angular/angular/commit/73d8bbd27cb46495426d4132975a1355b47ad915WEB
- https://github.com/angular/angular/commit/89b20568dfaee1ec8e0b3bcf1872acdddd2f4fefWEB
- https://github.com/angular/angular/commit/ba3bc47b20b3d12f5eb141ec9c651373ae4d15e8WEB
- https://github.com/angular/domino/commit/04f987dc08ff3736b427f50941adf1722458528fWEB
- https://github.com/angular/angularPACKAGE
- https://github.com/angular/angular/releases/tag/v20.3.30WEB
- https://github.com/angular/angular/releases/tag/v21.2.22WEB
- https://github.com/angular/angular/releases/tag/v22.1.4WEB
Frequently Asked Questions
- What is CVE-2026-88058?
- Angular SSR: XSS via Unescaped Processing Instruction (<?...?>) Nodes in Fallback Raw-Content Elements. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 8.1/10).
- How do I check if my project is affected by CVE-2026-88058?
- CVE-2026-88058 affects @angular/platform-server. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-88058 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This is a below-median EPSS score — only 35.6% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-41423HIGH
Angular: SSRF via protocol-relative and backslash URLs in Angular Platform-Server
- CVE-2026-88056HIGH
Angular: SSRF and Cross-Origin Credential Disclosure via URL Resolution Discrepancy in SSR
- CVE-2026-32635HIGH
Angular vulnerable to XSS in i18n attribute bindings
- CVE-2026-50556HIGH
@angular/platform-server: Missing `<noscript>` Raw-Text Serialization Escaping leads to Cross-Site Scripting (XSS) in Angular SSR
- CVE-2026-69151HIGH
Angular i18n: Cross-Site Scripting (XSS) via event-handler attributes
- CVE-2026-88060HIGH
Angular: SSR XSS via Unescaped <template> Content Across DocumentFragment Boundaries in Fallback Raw-Content Elements
- CVE-2026-69149HIGH
Angular SSR: Missing Fallback Raw-Content Serialization Escaping leads to Cross-Site Scripting (XSS)
- CVE-2026-50168HIGH
@angular/platform-server: URL Parser Differential leading to SSRF Allowlist Bypass