CVE-2026-50184 — @angular/service-worker
Fix: angular/angular#68904CVE-2026-50184 is a Information Exposure vulnerability in @angular/service-worker. A fix is available for @angular/service-worker — see the affected versions and patch details below.
Angular: Request Credential & Cache Policy Stripping in Angular Service Worker
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-50184.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@angular/service-workernpmDescription
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 explicit client-defined safety parameters: the credentials configuration (such as credentials: 'omit') and the HTTP cache mode configuration (such as cache: 'no-store'). These are reverted back to standard browser-default parameters (credentials: 'same-origin' and default HTTP cache properties).
This causes the browser to include active credentials (such as cookies or Authorization headers) on outbound requests where the client-side developer explicitly instructed they should be omitted, leading to potential session leaks. Additionally, it causes private or non-cacheable resources to be cached by the service worker's engine, making private page states accessible or persistent inside the client's local cache post-logout.
Impact
Web applications registering the @angular/service-worker package are vulnerable to credential exposure or post-logout cache persistence if client-side code relies on fetch calls with explicit safety attributes (such as { credentials: 'omit' } or { cache: 'no-store' }) targeting paths matched by service worker asset groups.
By stripping these safety boundaries, the service worker exposes same-origin cookies and dynamic sensitive data to endpoints that should not receive them, or retains dynamic user sessions in cache storage where logout operations fail to fully evict user records.
Attack Preconditions
To successfully exploit this vulnerability, all of the following application states and parameters must concurrently exist:
- Active Angular Service Worker: The target application uses
@angular/service-workerand has an active registration ofngsw-worker.jsinside the client's browser context. - Asset Group Matching: An
assetGroupspattern inngsw-config.jsonencompasses the target dynamic routing endpoint. - Established User Session: The victim user currently has an active authentication state, such as valid same-origin session cookies or auth headers stored by the browser.
- Client-Side Safe Fetch Call: The application initiates an explicit fetch request to the route with safety parameters:
{ credentials: 'omit' }or specific cache control parameters (e.g.{ cache: 'no-store' }).
Mitigations & Workarounds
If upgrading the @angular/service-worker package is not immediately feasible, developers should implement the following defensive measures:
- Strict Cookie Configuration: Apply strict flags to session cookies (
SameSite=Strict; Secure; HttpOnly) and ensure complete route isolation for credential-guarded secure resources. - Exclude Secure Endpoints from SW Config: Ensure that patterns targeting dynamic, secure endpoints are explicitly excluded from automatic asset groups or caching scopes in your
ngsw-config.json. - Post-Logout Cache Invalidation: Programmatically purge the browser's Cache Storage API entries registered by the Angular Service Worker upon user logout:
if ('caches' in window) { caches.keys().then(names => { for (let name of names) { if (name.startsWith('ngsw:')) { caches.delete(name); } } }); }
Patches
- 22.0.0-rc.2
- 21.2.15
- 20.3.22
- 19.2.23
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @angular/service-worker | ≥ 22.0.0-next.0&&< 22.0.0-rc.2 | 22.0.0-rc.2npm install @angular/service-worker@22.0.0-rc.2 |
| 📦npm | @angular/service-worker | ≥ 21.0.0-next.0&&< 21.2.15 | 21.2.15npm install @angular/service-worker@21.2.15 |
| 📦npm | @angular/service-worker | ≥ 20.0.0-next.0&&< 20.3.22 | 20.3.22npm install @angular/service-worker@20.3.22 |
| 📦npm | @angular/service-worker | ≥ 19.0.0-next.0&&< 19.2.23 | 19.2.23npm install @angular/service-worker@19.2.23 |
| 📦npm | @angular/service-worker | all versions | No fix |
Affected Products
angularangularDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @angular/service-worker, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @angular/service-worker to 22.0.0-rc.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-50184 is resolved across your whole dependency graph.
Workarounds
Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This Moderate impact flaw in the `@angular/service-worker` component, which could lead to session leaks and cached private data due to improper handling of client-defined security settings during network request reconstruction, does not affect Red Hat products. The vulnerable code is not present in Red Hat JBoss Fuse.
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for CVE-2026-50184 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2026-50184 in your dependencies?
Find it across npm, including transitive dependencies.