CVE-2026-44437: Angular SSR Open Redirect and Request Steering via Encoded X-Forwarded-Prefix
Summary
CVE-2026-44437: Angular SSR has Open Redirect and Request Steering via Encoded X-Forwarded-Prefix. Affects @angular/ssr across 4 version ranges.
>= 19.0.0-next.0, < 19.2.25
>= 20.0.0-next.0, < 20.3.25
>= 21.0.0-next.0, < 21.2.9
>= 22.0.0-next.0, < 22.0.0-next.7
Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Angular SSR (Server-Side Rendering) is a powerful feature of the Angular framework that allows developers to render applications on the server, improving performance and SEO. It processes requests and serves pre-rendered pages to clients, enhancing user experience. However, vulnerabilities in its handling of proxy headers can expose applications to significant security risks, particularly when misconfigured.
Vulnerability Detail
A vulnerability exists in the X-Forwarded-Prefix header processing logic within Angular SSR. The internal validation mechanism fails to properly account for URL-encoded characters, specifically dots (%2e%2e). This allows an attacker to bypass security filters by injecting encoded path traversal sequences that are later decoded and utilized by the application logic. The vulnerability can lead to two main issues: Open Redirect, where the application processes a redirect to an unintended path or external domain, and Server-Side Request Steering, where the manipulated prefix is used as the base path for server-side HttpClient requests, causing the server to make requests to unintended internal paths or external endpoints.
How To Fix
Latest published version: 22.2.4 as of 22 Oct 2026
npm install @angular/ssr@22.2.4
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
>= 19.0.0-next.0, < 19.2.2519.2.25npm install @angular/ssr@19.2.25 -
>= 20.0.0-next.0, < 20.3.2520.3.25npm install @angular/ssr@20.3.25 -
>= 21.0.0-next.0, < 21.2.921.2.9npm install @angular/ssr@21.2.9 -
>= 22.0.0-next.0, < 22.0.0-next.722.0.0-next.7npm install @angular/ssr@22.0.0-next.7
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
Until the patch is applied, developers should manually sanitize the X-Forwarded-Prefix header in their server.ts file. The following code snippet demonstrates how to implement this workaround:
app.use((req, res, next) => {
let prefix = req.headers['x-forwarded-prefix'];
if (Array.isArray(prefix)) prefix = prefix[0];
if (prefix) {
try {
const decodedPrefix = decodeURIComponent(prefix);
req.headers['x-forwarded-prefix'] = decodedPrefix
.replace(/\.\.\/g, '')
.
replace(/^[\/\\]+\//, '/');
} catch (e) {
delete req.headers['x-forwarded-prefix'];
}
}
next();
});
Conclusion
The vulnerability CVE-2026-44437 in Angular SSR poses significant security risks due to improper handling of the X-Forwarded-Prefix header. It is crucial for developers to update to the patched versions of the package and implement the recommended workarounds to safeguard their applications.
See every vulnerability recorded for @angular/ssr →
FAQ
The CVSS score of this vulnerability is 6.9, indicating a moderate severity level.
The vulnerability can lead to Open Redirects and Server-Side Request Steering, potentially exposing sensitive data or redirecting users to malicious sites.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can also check your application using the Vulert playground without any signup.
Implement the provided workaround to sanitize the X-Forwarded-Prefix header until you can update to a patched version.
More information can be found in the Angular GitHub repository and the official Angular documentation regarding security best practices.
References
Related vulnerabilities
Recent vulnerabilities recorded for @angular/ssr.