MEDIUM 6.1

CVE-2026-50169: Angular Service Worker Redirect Policy Bypass Vulnerability

Angular's Service Worker has a flaw in how it handles network requests for cached assets. When the Service Worker reconstructs requests, it accidentally strips away security settings that tell the browser not to follow redirects—instead forcing all redirects to be followed automatically. This can leak sensitive data if a public page redirects to a restricted area, since cookies and session tokens travel along. The vulnerability affects Angular versions prior to 22.0.0-rc.2, 21.2.15, 20.3.22, and 19.2.23.

Source data · NVD / CISA · public domain

CVSS
3.1 · 6.1 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weaknesses (CWE)
CWE-200, CWE-441, CWE-524
Affected products
16 configuration(s)
Published / Modified
2026-06-22 / 2026-07-09

NVD description (verbatim)

Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages. Prior to 22.0.0-rc.2, 21.2.15 20.3.22, and 19.2.23, an issue in the @angular/service-worker package compromises the integrity of request-policy enforcement during request reconstruction. When the Angular Service Worker intercepts network requests for matched assets, it reconstructs a new Request object using an internal helper function. During this reconstruction process, the helper function strips the strict, client-defined request redirect policy configuration (such as redirect: 'error'), falling back to the browser's default 'follow' strategy. If the target web application makes client-side requests with a strict policy (e.g., expecting a network error instead of automatically following redirects), the service worker will bypass this instruction and automatically follow HTTP 3xx redirects to other destinations. This acts as an unintended proxy/intermediary ("Confused Deputy") and can result in cookie/credential exposure or same-origin session-restricted data leakage if public dynamic routes redirect to sensitive routes. This vulnerability is fixed in 22.0.0-rc.2, 21.2.15, 20.3.22, and 19.2.23.

2 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

The vulnerability exists in the @angular/service-worker package's request reconstruction logic. When intercepting and reprocessing network requests for matched service-worker assets, an internal helper function fails to preserve the original Request object's redirect policy property. Specifically, client-defined policies like redirect: 'error' (which signals that redirect responses should be treated as network errors) are discarded, and the browser default redirect: 'follow' is applied instead. This causes the Service Worker to act as an unintended proxy, automatically following HTTP 3xx responses without respecting the application's intended security posture. The flaw is classified under CWE-200 (Information Exposure), CWE-441 (Unintended Proxy/Intermediary), and CWE-524 (Uncontrolled Format String), reflecting the credential leakage and confused-deputy aspects of the issue.

Business impact

Applications relying on Service Worker request interception for offline functionality or performance optimization face credential exposure risk. If a public or semi-public route is redirected to an authenticated area (e.g., admin panel, user profile), the Service Worker will silently follow that redirect while preserving cookies and authorization headers, potentially exposing session-restricted data to unintended recipients. This is particularly acute in single-page applications (SPAs) where client-side routing policies are meant to enforce strict security boundaries. The impact is further amplified in multi-tenant or shared-hosting environments where a single application misconfiguration can leak data across security domains.

Affected systems

Angular applications versions 19.x prior to 19.2.23, 20.x prior to 20.3.22, 21.x prior to 21.2.15, and 22.x prior to 22.0.0-rc.2 are affected if they: (1) use the @angular/service-worker package, (2) configure the Service Worker to intercept network requests, and (3) define request policies that restrict redirect behavior (e.g., redirect: 'error'). Organizations running long-term support (LTS) versions or stable releases in production should prioritize upgrading the Angular framework and service-worker package.

Exploitability

Exploitability requires user interaction (UI:R in the CVSS vector), meaning a victim must navigate to or interact with the affected application. The attack is network-accessible (AV:N) and requires no special privileges (PR:N). An attacker cannot directly weaponize this; instead, the vulnerability creates a window for data leakage when the application's routing logic is bypassed by the Service Worker's automatic redirect handling. The CVSS score of 6.1 (Medium) reflects the moderate barrier to exploitation and the requirement for application-specific redirect chains to exist. No public exploit code or active abuse is currently documented.

Remediation

Upgrade Angular and the @angular/service-worker package to patched versions immediately: 22.0.0-rc.2 or later, 21.2.15 or later, 20.3.22 or later, or 19.2.23 or later, depending on your supported version line. Verify the patch version in your node_modules/@angular/service-worker/package.json or lock file after upgrade. For teams unable to upgrade immediately, review and disable Service Worker interception for sensitive routes, or implement server-side redirect validation to reject unexpected redirect destinations.

Patch guidance

1. Update your package.json or use npm/yarn upgrade commands to pull the patched Angular versions. 2. Verify package-lock.json or yarn.lock reflects the new version. 3. Rebuild and test your Service Worker registration and offline behavior to ensure the fix does not break existing functionality. 4. Run your full integration test suite, paying special attention to routes that rely on redirect behavior. 5. For LTS users on version 18 or earlier, contact Angular support to determine patch availability or plan a major version upgrade.

Detection guidance

Review Service Worker configuration in your angular.json (assetGroups, dataGroups) and identify which routes and assets are intercepted. Audit application code for explicit redirect: 'error' or redirect: 'manual' policies in fetch() calls or HttpClient interceptors. Monitor browser console logs and network traffic for unexpected redirects that occur after Service Worker activation. Implement unit and integration tests that verify redirect policies are enforced end-to-end, including through the Service Worker. Check web server logs for redirect chains involving sensitive endpoints.

Why prioritize this

Although the CVSS score is Medium (6.1), this vulnerability warrants prompt attention because: (1) it affects a widely-used development platform used by thousands of organizations, (2) data leakage via credential exposure can result in account takeover or sensitive information disclosure, (3) the vulnerability requires only user interaction and network access—no special conditions—and (4) the fix is available across all supported version lines. Organizations running production Angular applications with Service Workers should treat this as a near-term patch priority.

Risk score, explained

CVSS 6.1 (Medium) reflects a combination of network accessibility (AV:N), low attack complexity (AC:L), and no privilege requirement (PR:N), balanced against the requirement for user interaction (UI:R) and scoped impact (S:C) limited to confidentiality and integrity without availability loss (C:L/I:L/A:N). The score appropriately captures the fact that while the vulnerability is easy to trigger, it depends on specific application routing configurations and user navigation to an affected page. It is not a remote code execution or denial-of-service issue, hence Medium severity rather than High.

Frequently asked questions

Does this vulnerability affect applications that do not use @angular/service-worker?

No. The vulnerability is specific to the @angular/service-worker package. Applications that do not register or use a Service Worker are not affected. However, if your application includes the package as a dependency, you should still upgrade to prevent accidental enablement or confusion.

Can this vulnerability be exploited without user interaction?

No. The CVSS vector includes UI:R, meaning a user must navigate to or interact with the affected application for the vulnerability to manifest. An attacker cannot trigger credential leakage remotely; the user's browser must load the Service Worker and navigate to a route that triggers an unintended redirect.

What is a 'Confused Deputy' in this context?

A Confused Deputy occurs when a trusted intermediary (here, the Service Worker) is tricked into performing an unintended action on behalf of a principal (the browser/user). In this case, the Service Worker's bypass of redirect policies causes it to follow redirects the application explicitly forbade, leaking credentials to unintended destinations—acting as an unwitting proxy.

Are there workarounds if we cannot upgrade immediately?

Partial mitigations include: disabling Service Worker interception for sensitive routes via angular.json configuration, implementing server-side redirect validation to reject suspicious destinations, or reducing Service Worker scope to non-sensitive assets. However, these are temporary measures; upgrading is the proper fix.

This analysis is provided for informational purposes and represents SEC.co's interpretation of publicly available vulnerability data as of the publication date. Organizations should verify patch availability and compatibility with their specific Angular versions and deployment environments against official Angular security advisories. This vulnerability requires user interaction to exploit and is not currently known to be actively exploited in the wild. The remediation steps provided are general guidance; consult your development and operations teams for environment-specific implementation details. No warranty is provided regarding the completeness or accuracy of this analysis. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).