@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.
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();
});
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | @angular/platform-server | >= 22.0.0-next.0, < 22.0.0-next.12, >= 21.0.0-next.0, < 21.2.13, >= 20.0.0-next.0, < 20.3.21, >= 19.0.0-next.0, < 19.2.22, <= 18.2.14 | 22.0.0-next.12, 21.2.13, 20.3.21, 19.2.22 |
References
- https://github.com/angular/angular/security/advisories/GHSA-rfh7-fxqc-q52v
- https://nvd.nist.gov/vuln/detail/CVE-2026-46417
- https://github.com/angular/angular/pull/68570
- https://access.redhat.com/security/cve/CVE-2026-46417
- https://bugzilla.redhat.com/show_bug.cgi?id=2491444
- https://github.com/angular/angular
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-46417.json
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N- Weakness (CWE)
CWE-918- Platform
- npm
- Package
@angular/platform-server- Disclosed
- 19.05.2026
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-rfh7-fxqc-q52v - CC BY 4.0
Vulnerability history: @angular/platform-server
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 12
- First → latest
- 09.2025 10.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 11
- Medium 1
Disclosures per year
- 2025: 1
- 2026: 11
-
@angular/platform-server: SSRF via Hostname Hijacking this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.