CVE-2026-46417: @angular/platform-server: SSRF via Hostname Hijacking
Impact A Server-Side Request Forgery (SSRF) vulnerability exists in @angular/platform-server. The issue stems from how the server-side rendering (SSR) engine processes the request URL provided to the rendering entry points.
Published May 19, 2026 · Updated Jul 15, 2026
Affected packages
@angular/platform-server
- Ecosystem
- npm
- Affected
- >= 22.0.0-next.0, < 22.0.0-next.12
- Fixed in
- 22.0.0-next.12
- Check
npm ls @angular/platform-server
@angular/platform-server
- Ecosystem
- npm
- Affected
- >= 21.0.0-next.0, < 21.2.13
- Fixed in
- 21.2.13
- Check
npm ls @angular/platform-server
@angular/platform-server
- Ecosystem
- npm
- Affected
- >= 20.0.0-next.0, < 20.3.21
- Fixed in
- 20.3.21
- Check
npm ls @angular/platform-server
@angular/platform-server
- Ecosystem
- npm
- Affected
- >= 19.0.0-next.0, < 19.2.22
- Fixed in
- 19.2.22
- 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
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Impact
A Server-Side Request Forgery (SSRF) vulnerability exists in @angular/platform-server. The issue stems from how the server-side rendering (SSR) engine processes the request URL provided to the rendering entry points.
When an absolute-form URL (e.g., http://evil.com) is passed to the rendering engine, the internal ServerPlatformLocation can be manipulated into adopting the attacker-controlled domain as the "current" hostname.
Consequently, any relative HttpClient requests or PlatformLocation.hostname references are redirected to the attacker controlled server, potentially exposing internal APIs or metadata services.
Fix Information
The vulnerability is mitigated by introducing an Allowlist Mechanism directly into the core rendering APIs. The renderModule and renderApplication functions now include an allowedHosts configuration option. The rendering engine validates the hostname extracted from the request URL against this list before proceeding. If the hostname does not match an allowed entry, the engine prevents the hostname hijacking, ensuring that HttpClient requests remain restricted to trusted domains.
Patches
- 22.0.0-next.12
- 21.2.13
- 20.3.21
- 19.2.22
Workarounds
Developers unable to update immediately should implement strict URL validation in their server entry point (e.g., server.ts). Ensure that req.url is validated against a known list of trusted hostnames or normalized to a relative path before being passed torenderApplication or renderModule.
// Example manual normalization in Express
app.get('*', (req, res, next) => {
const trustedHost = 'localhost:4000';
// Ensure the request target matches expectations
if (req.headers.host !== trustedHost) {
return res.status(403).send('Forbidden');
}
next();
});Credited to alan-agius4, AndrewKushnir, VenkatKwest, dgp1130.
References
- https://github.com/angular/angular/security/advisories/GHSA-rfh7-fxqc-q52v
- https://github.com/angular/angular/pull/68570
- https://nvd.nist.gov/vuln/detail/CVE-2026-46417
- https://access.redhat.com/security/cve/CVE-2026-46417
- https://bugzilla.redhat.com/show_bug.cgi?id=2491444
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-46417.json
- https://github.com/advisories/GHSA-rfh7-fxqc-q52v
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
