Vulnerabilities in pkg:npm/@nguniversal/express-engine

PACKAGE
Advisory Identifier: GHSA-x288-3778-4hhx
Advisory Summary

CVE-2026-27739 is a CRITICAL angular ssr is vulnerable to vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting @angular/ssr libraries in the npm ecosystem. The issue involves angular ssr is vulnerable to ssrf and header injection via request handling pipeline. Remediation is available by upgrading affected packages to version 19.2.21, 21.1.5, 21.2.0-rc.1, 20.3.17.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@nguniversal/express-engine

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@nguniversal/express-engine. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-x288-3778-4hhx CVE-2026-27739 CRITICAL Angular SSR is vulnerable to SSRF and Header Injection via request handling pipeline

CVE-2026-27739 at a Glance

CVE Identifier CVE-2026-27739
GHSA Identifier GHSA-x288-3778-4hhx
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-918: Server-Side Request Forgery (SSRF)
Affected Product @angular/ssr
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-27739

To remediate this vulnerability, upgrade all affected @angular/ssr dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@angular/ssr fixed: 19.2.21
npm install @angular/ssr@19.2.21
@angular/ssr fixed: 21.1.5
npm install @angular/ssr@21.1.5
@angular/ssr fixed: 21.2.0-rc.1
npm install @angular/ssr@21.2.0-rc.1
@angular/ssr fixed: 20.3.17
npm install @angular/ssr@20.3.17
@nguniversal/common fixed: Latest secure release
npm install @nguniversal/common@Latest secure release
@nguniversal/express-engine fixed: Latest secure release
npm install @nguniversal/express-engine@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @angular/ssr

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-27739, inspect your project dependencies using npm:

npm ls @angular/ssr

Analyze the terminal output to locate any version of @angular/ssr in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 19.2.21), your application is affected.

Note: The npm ls @angular/ssr command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In @angular/ssr, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A [Server-Side Request Forgery (SSRF)](https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/SSRF) vulnerability has been identified in the Angular SSR request handling pipeline. The vulnerability exists because Angular’s internal URL reconstruction logic directly trusts and consumes user-controlled HTTP headers specifically the Host and `X-Forwarded-*` family to determine the application's base origin without any validation of the destination domain. Specifically, the framework didn't have checks for the following: - **Host Domain**: The `Host` and `X-Forwarded-Host` headers were not checked to belong to a trusted origin. This allows an attacker to redefine the "base" of the application to an arbitrary external domain. - **Path & Character Sanitization**: The `X-Forwarded-Host` header was not checked for path segments or special characters, allowing manipulation of the base path for all resolved relative URLs. - **Port Validation**: The `X-Forwarded-Port` header was not verified as numeric, leading to malformed URI construction or injection attacks. This vulnerability manifests in two primary ways: - **Implicit Relative URL Resolution**: Angular's `HttpClient` resolves relative URLs against this unvalidated and potentially malformed base origin. An attacker can "steer" these requests to an external server or internal service. - **Explicit Manual Construction**: Developers injecting the `REQUEST` object to manually construct URLs (for fetch or third-party SDKs) directly inherit these unsanitized values. By accessing the `Host` / `X-Forwarded-*` headers, the application logic may perform requests to attacker-controlled destinations or malformed endpoints. ### Impact When successfully exploited, this vulnerability allows for arbitrary internal request steering. This can lead to: - **Credential Exfiltration**: Stealing sensitive `Authorization` headers or session cookies by redirecting them to an attacker's server. - **Internal Network Probing**: Accessing and transmitting data from internal services, databases, or cloud metadata endpoints (e.g., `169.254.169.254`) not exposed to the public internet. - Confidentiality Breach: Accessing sensitive information processed within the application's server-side context. ### Attack Preconditions - The victim application must use Angular SSR (Server-Side Rendering). - The application must perform `HttpClient` requests using relative URLs OR manually construct URLs using the unvalidated `Host` / `X-Forwarded-*` headers using the `REQUEST` object. - **Direct Header Access**: The application server is reachable by an attacker who can influence these headers without strict validation from a front-facing proxy. - **Lack of Upstream Validation**: The infrastructure (Cloud, CDN, or Load Balancer) does not sanitize or validate incoming headers. ### Patches - 21.2.0-rc.1 - 21.1.5 - 20.3.17 - 19.2.21 ### Workarounds - **Use Absolute URLs:** Avoid using `req.headers` for URL construction. Instead, use trusted variables for your base API paths. - **Implement Strict Header Validation (Middleware)**: If you cannot upgrade immediately, implement a middleware in your `server.ts` to enforce numeric ports and validated hostnames. ```ts const ALLOWED_HOSTS = new Set(['your-domain.com']); app.use((req, res, next) => { const hostHeader = (req.headers['x-forwarded-host'] ?? req.headers['host'])?.toString(); const portHeader = req.headers['x-forwarded-port']?.toString(); if (hostHeader) { const hostname = hostHeader.split(':')[0]; // Reject if hostname contains path separators or is not in allowlist if (/^[a-z0-9.:-]+$/i.test(hostname) || (!ALLOWED_HOSTS.has(hostname) && hostname !== 'localhost')) { return res.status(400).send('Invalid Hostname'); } } // Ensure port is strictly numeric if provided if (portHeader && !/^\d+$/.test(portHeader)) { return res.status(400).send('Invalid Port'); } next(); }); ``` ### References - [Fix](https://github.com/angular/angular-cli/pull/32516) - [Docs](https://angular.dev/best-practices/security#preventing-server-side-request-forgery-ssrf)

CVE-2026-27739 Affected @angular/ssr Versions

6 component(s)
Fixed Versions:
19.2.2121.1.521.2.0-rc.120.3.17
Product / Package Ecosystem Affected Versions Fixed Version
@angular/ssr
npm
< 19.2.21
19.2.21
@angular/ssr
npm
≥ 21.0.0-next.0
< 21.1.5
21.1.5
@angular/ssr
npm
≥ 21.2.0-next.0
< 21.2.0-rc.1
21.2.0-rc.1
@angular/ssr
npm
≥ 20.0.0-next.0
< 20.3.17
20.3.17
@nguniversal/common
npm
≤ 16.2.0
@nguniversal/express-engine
npm
≤ 16.2.0

References

Frequently Asked Questions

What is CVE-2026-27739?
CVE-2026-27739 is a security vulnerability in @angular/ssr involving Angular SSR is vulnerable to SSRF and Header Injection via request handling pipeline under CWE-918: Server-Side Request Forgery (SSRF).
Which @angular/ssr versions are affected?
Affected versions include releases prior to 19.2.21, 21.1.5, 21.2.0-rc.1, 20.3.17 across affected packages: @angular/ssr, @nguniversal/common, @nguniversal/express-engine.
What version fixes CVE-2026-27739?
Upgrading to 19.2.21, 21.1.5, 21.2.0-rc.1, 20.3.17 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @angular/ssr affected?
Yes, @angular/ssr is affected in releases prior to 19.2.21, 21.1.5, 21.2.0-rc.1, 20.3.17. Upgrade your dependency to 19.2.21, 21.1.5, 21.2.0-rc.1, 20.3.17 or later.
Is @nguniversal/common affected?
Yes, @nguniversal/common is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2026-27739?
CVE-2026-27739 is classified under CWE-918: Server-Side Request Forgery (SSRF) (The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.).
How can I check npm dependencies for CVE-2026-27739?
Run the dependency tree command: 'npm ls @angular/ssr'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-x288-3778-4hhx",
  "modified" : "2026-02-25T22:42:36Z",
  "published" : "2026-02-25T22:42:36Z",
  "aliases" : [ "CVE-2026-27739" ],
  "summary" : "Angular SSR is vulnerable to SSRF and Header Injection via request handling pipeline",
  "details" : "A [Server-Side Request Forgery (SSRF)](https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/SSRF) vulnerability has been identified in the Angular SSR request handling pipeline. The vulnerability exists because Angular’s internal URL reconstruction logic directly trusts and consumes user-controlled HTTP headers specifically the Host and `X-Forwarded-*` family to determine the application's base origin without any validation of the destination domain.\n\nSpecifically, the framework didn't have checks for the following:\n- **Host Domain**: The `Host` and `X-Forwarded-Host` headers were not checked to belong to a trusted origin. This allows an attacker to redefine the \"base\" of the application to an arbitrary external domain.\n- **Path & Character Sanitization**: The `X-Forwarded-Host` header was not checked for path segments or special characters, allowing manipulation of the base path for all resolved relative URLs.\n- **Port Validation**: The `X-Forwarded-Port` header was not verified as numeric, leading to malformed URI construction or injection attacks.\n\n\nThis vulnerability manifests in two primary ways:\n\n- **Implicit Relative URL Resolution**: Angular's `HttpClient` resolves relative URLs against this unvalidated and potentially malformed base origin. An attacker can \"steer\" these requests to an external server or internal service.\n- **Explicit Manual Construction**: Developers injecting the `REQUEST` object to manually construct URLs (for fetch or third-party SDKs) directly inherit these unsanitized values. By accessing the `Host` / `X-Forwarded-*` headers, the application logic may perform requests to attacker-controlled destinations or malformed endpoints.\n\n### Impact\n\nWhen successfully exploited, this vulnerability allows for arbitrary internal request steering. This can lead to:\n- **Credential Exfiltration**: Stealing sensitive `Authorization` headers or session cookies by redirecting them to an attacker's server.\n- **Internal Network Probing**: Accessing and transmitting data from internal services, databases, or cloud metadata endpoints (e.g., `169.254.169.254`) not exposed to the public internet.\n- Confidentiality Breach: Accessing sensitive information processed within the application's server-side context.\n\n### Attack Preconditions\n\n- The victim application must use Angular SSR (Server-Side Rendering).\n- The application must perform `HttpClient` requests using relative URLs OR manually construct URLs using the unvalidated `Host` / `X-Forwarded-*` headers using the `REQUEST` object.\n- **Direct Header Access**: The application server is reachable by an attacker who can influence these headers without strict validation from a front-facing proxy.\n- **Lack of Upstream Validation**: The infrastructure (Cloud, CDN, or Load Balancer) does not sanitize or validate incoming headers.\n\n### Patches\n\n- 21.2.0-rc.1\n- 21.1.5\n- 20.3.17\n- 19.2.21\n\n\n### Workarounds\n- **Use Absolute URLs:** Avoid using `req.headers` for URL construction. Instead, use trusted variables for your base API paths.\n- **Implement Strict Header Validation (Middleware)**: If you cannot upgrade immediately, implement a middleware in your `server.ts` to enforce numeric ports and validated hostnames.\n\n```ts\nconst ALLOWED_HOSTS = new Set(['your-domain.com']);\n\napp.use((req, res, next) => {\n  const hostHeader = (req.headers['x-forwarded-host'] ?? req.headers['host'])?.toString();\n  const portHeader = req.headers['x-forwarded-port']?.toString();\n\n  if (hostHeader) {\n    const hostname = hostHeader.split(':')[0];\n    // Reject if hostname contains path separators or is not in allowlist\n    if (/^[a-z0-9.:-]+$/i.test(hostname) || \n       (!ALLOWED_HOSTS.has(hostname) && hostname !== 'localhost')) {\n      return res.status(400).send('Invalid Hostname');\n    }\n  }\n\n  // Ensure port is strictly numeric if provided\n  if (portHeader && !/^\\d+$/.test(portHeader)) {\n    return res.status(400).send('Invalid Port');\n  }\n\n  next();\n});\n```\n\n### References\n\n- [Fix](https://github.com/angular/angular-cli/pull/32516)\n- [Docs](https://angular.dev/best-practices/security#preventing-server-side-request-forgery-ssrf)",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:L/VA:N/SC:H/SI:L/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/ssr"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "21.2.0-next.0"
      }, {
        "fixed" : "21.2.0-rc.1"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 21.2.0-rc.0"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/ssr"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "21.0.0-next.0"
      }, {
        "fixed" : "21.1.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/ssr"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "20.0.0-next.0"
      }, {
        "fixed" : "20.3.17"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@angular/ssr"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "19.2.21"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@nguniversal/common"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "16.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@nguniversal/express-engine"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "16.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular-cli/security/advisories/GHSA-x288-3778-4hhx"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-27739"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/angular/angular-cli/pull/32516"
  }, {
    "type" : "WEB",
    "url" : "https://angular.dev/best-practices/security#preventing-server-side-request-forgery-ssrf"
  }, {
    "type" : "WEB",
    "url" : "https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/SSRF"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/angular/angular-cli"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-918" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-25T22:42:36Z",
    "nvd_published_at" : "2026-02-25T18:23:40Z"
  }
}