GHSA-rfh7-fxqc-q52v

Suggest an improvement
Source
https://github.com/advisories/GHSA-rfh7-fxqc-q52v
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-rfh7-fxqc-q52v/GHSA-rfh7-fxqc-q52v.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-rfh7-fxqc-q52v
Aliases
Published
2026-05-19T20:29:49Z
Modified
2026-07-15T22:15:53Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
  • 8.8 (High) CVSS_V4 - CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:L/SI:L/SA:N CVSS Calculator
Summary
@angular/platform-server: SSRF via Hostname Hijacking
Details

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();
});
Database specific
{
    "cwe_ids":  [
        "CWE-918"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-05-19T20:29:49Z",
    "nvd_published_at":  "2026-06-22T18:16:38Z",
    "severity":  "HIGH"
}
References

Affected packages

npm
@angular/platform-server

Package

Name
@angular/platform-server
View open source insights on deps.dev
Purl
pkg:npm/%40angular/platform-server

Affected ranges

Type
SEMVER
Events
Introduced
22.0.0-next.0
Fixed
22.0.0-next.12

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-rfh7-fxqc-q52v/GHSA-rfh7-fxqc-q52v.json"
@angular/platform-server

Package

Name
@angular/platform-server
View open source insights on deps.dev
Purl
pkg:npm/%40angular/platform-server

Affected ranges

Type
SEMVER
Events
Introduced
21.0.0-next.0
Fixed
21.2.13

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-rfh7-fxqc-q52v/GHSA-rfh7-fxqc-q52v.json"
@angular/platform-server

Package

Name
@angular/platform-server
View open source insights on deps.dev
Purl
pkg:npm/%40angular/platform-server

Affected ranges

Type
SEMVER
Events
Introduced
20.0.0-next.0
Fixed
20.3.21

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-rfh7-fxqc-q52v/GHSA-rfh7-fxqc-q52v.json"
@angular/platform-server

Package

Name
@angular/platform-server
View open source insights on deps.dev
Purl
pkg:npm/%40angular/platform-server

Affected ranges

Type
SEMVER
Events
Introduced
19.0.0-next.0
Fixed
19.2.22

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-rfh7-fxqc-q52v/GHSA-rfh7-fxqc-q52v.json"
@angular/platform-server

Package

Name
@angular/platform-server
View open source insights on deps.dev
Purl
pkg:npm/%40angular/platform-server

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Last Affected
18.2.14

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-rfh7-fxqc-q52v/GHSA-rfh7-fxqc-q52v.json"