CVE-2026-50168: @angular/platform-server: URL Parser Differential leading to SSRF Allowlist Bypass
An issue in the @angular/platform-server package allows remote attackers to bypass host allowlist constraints and direct server-side outgoing requests to arbitrary external endpoints. This occurs due to a parser differential between the strict WHATWG URL parser used for allowlist validation and the lenient Domino URL parser used to initialize the server emulated DOM.
Published Jun 15, 2026 · Updated Jul 15, 2026
Affected packages
@angular/platform-server
- Ecosystem
- npm
- Affected
- >= 22.0.0-next.0, < 22.0.0-rc.2
- Fixed in
- 22.0.0-rc.2
- Check
npm ls @angular/platform-server
@angular/platform-server
- Ecosystem
- npm
- Affected
- >= 20.0.0-next.0, < 20.3.22
- Fixed in
- 20.3.22
- Check
npm ls @angular/platform-server
@angular/platform-server
- Ecosystem
- npm
- Affected
- >= 19.0.0-next.0, < 19.2.23
- Fixed in
- 19.2.23
- Check
npm ls @angular/platform-server
@angular/platform-server
- Ecosystem
- npm
- Affected
- <= 18.2.14
- Fixed in
- No patched version yet
- Check
npm ls @angular/platform-server
@angular/platform-server
- Ecosystem
- npm
- Affected
- >= 21.0.0-next.0, < 21.2.15
- Fixed in
- 21.2.15
- Check
npm ls @angular/platform-server
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
An issue in the @angular/platform-server package allows remote attackers to bypass host allowlist constraints and direct server-side outgoing requests to arbitrary external endpoints. This occurs due to a parser differential between the strict WHATWG URL parser used for allowlist validation and the lenient Domino URL parser used to initialize the server emulated DOM.
When a server-side request contains a malformed URL with a double port structure (e.g., http://evil.com:80:80/path), Node's strict URL.canParse(url) logic returns false and skips host check validation entirely. However, the same malformed URL is later accepted and parsed leniently by Domino's internal parser, which resolves the origin to http://evil.com:80. The Angular SSR HTTP request interceptor (relativeUrlsTransformerInterceptorFn) then resolves all relative backend HTTP requests against this adopted origin, executing the SSRF attack.
Impact
Any Angular application utilizing server-side rendering (@angular/platform-server) that configures host routing allowlists (allowedHosts) is vulnerable to this allowlist bypass.
By sending an HTTP request with a malformed Host header (e.g. Host: evil.com:80:80) or an absolute-form request URI, an attacker can bypass the allowlist logic completely (even when configured with a strict default deny setup). The SSR application will then route all relative HttpClient outgoing API queries—which commonly carry sensitive credentials, session cookies, and internal authorization tokens—to the attacker-controlled server instead of the intended backend services. Additionally, the attacker can supply custom payloads back to the emulated DOM, leading to response injection and content poisoning within the rendered HTML served to users.
Attack Preconditions
To successfully exploit this vulnerability, the following environment parameters and application states must all concurrently exist:
- Active Server-Side Rendering (SSR): The application must be configured to run with Angular Server-Side Rendering (
@angular/platform-server). - Host Header/URI Propagation: The SSR handler must reconstruct the request URL using raw client inputs (such as request Host headers or absolute-form URIs) and pass it as
config.urlto the rendering API (renderApplicationorrenderModule). - Outbound Relative HTTP Requests: The server application must perform outbound backend API requests using relative paths (e.g.,
this.http.get('/api/data')) that undergo base-URL interceptor rewriting. - Enabled Allowed Hosts Check: The server must use the framework-provided
allowedHostsoptions to limit valid server locations.
Patches
- 22.0.0-rc.2
- 21.2.15
- 20.3.22
- 19.2.23
Credited to alan-agius4, AndrewKushnir, josephperrott, 0xEr3n.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-111754
@angular/platform-server: Open Redirect via Protocol-Relative URLs in Server-Side Rendering (SSR)
medium5.1No fixOct 20, 2026CVE-2026-101895
Angular SSR: Denial of Service (DoS) via Infinite Loop on Malformed DOCTYPE
high8.7No fixSep 28, 2026CVE-2026-88058
Angular SSR: XSS via Unescaped Processing Instruction (<?...?>) Nodes in Fallback Raw-Content Elements
high8.6No fixSep 28, 2026CVE-2026-88056
Angular: SSRF and Cross-Origin Credential Disclosure via URL Resolution Discrepancy in SSR
high8.6No fixSep 10, 2026CVE-2026-88060
Angular: SSR XSS via Unescaped <template> Content Across DocumentFragment Boundaries in Fallback Raw-Content Elements
high8.6No fixSep 10, 2026CVE-2026-69149
Angular SSR: Missing Fallback Raw-Content Serialization Escaping leads to Cross-Site Scripting (XSS)
high8.6No fixAug 3, 2026
