CVE-2026-50184: Angular Service Worker Request Security Policy Bypass – Credential Leak & Cache Exposure
Angular's Service Worker package has a flaw where it unintentionally reverses security settings you've configured for network requests. When your application tells the browser not to send credentials (like cookies) on a particular request, or marks a response as non-cacheable, the Service Worker strips those instructions and applies default settings instead. This can leak session data or cache sensitive pages in local storage even after logout. The issue 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-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 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. 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 @angular/service-worker package contains a request reconstruction flaw in its helper function that handles intercepted network requests for matched assets. During reconstruction, the function explicitly strips the Request object's credentials configuration (e.g., credentials: 'omit') and cache mode directives (e.g., cache: 'no-store'), reverting them to browser defaults (credentials: 'same-origin' and standard HTTP cache behavior). This causes two security outcomes: (1) credentials are included on outbound requests despite explicit client-side omission directives, enabling potential session leakage; and (2) responses marked as private or non-cacheable are cached by the service worker, persisting sensitive application state in client-side storage beyond the intended session lifetime. The vulnerability stems from CWE-200 (Exposure of Sensitive Information) and CWE-524 (Use of Cache containing Sensitive Information).
Business impact
Organizations deploying Angular applications with Service Workers may expose authenticated session data (cookies, tokens) in network traffic or cache private user pages in persistent local storage. This creates dual risks: active session hijacking if credentials leak across network boundaries, and post-logout information disclosure if cached private state remains accessible. For applications handling PII, health data, or financial information, this could result in compliance violations (GDPR, HIPAA, PCI-DSS) and user trust damage. The impact is user-facing and affects any deployed Angular app relying on Service Worker caching before the fix versions.
Affected systems
Angular versions 19.x prior to 19.2.23, 20.x prior to 20.3.22, 21.x prior to 21.2.15, and 22.0.0-rc.1 and earlier are vulnerable. The @angular/service-worker package is the affected component; applications must explicitly use this package for the vulnerability to manifest. Applications using only core Angular without the service-worker module are not affected. Verify your package.json dependencies and Angular version to confirm exposure.
Exploitability
The vulnerability requires user interaction (UI:R in the CVSS vector) and is limited to network-accessible Angular applications with Service Workers enabled. An attacker cannot directly trigger the flaw; exploitation depends on users accessing the vulnerable application, at which point the Service Worker's default behavior leaks credentials or caches sensitive data. No specialized tools or credentials are required from an attacker perspective—the flaw is inherent to how the Service Worker reconstructs requests. The attack surface is broad (AV:N) but confined to applications that have deployed the vulnerable package.
Remediation
Upgrade the @angular/service-worker package and Angular to one of the patched versions: 22.0.0-rc.2 or later, 21.2.15 or later, 20.3.22 or later, or 19.2.23 or later. After patching, redeploy your application and clear Service Worker caches in affected user browsers (Service Workers may need manual invalidation depending on your update strategy). Verify that your Service Worker configuration correctly specifies credentials and cache policies in your ngsw-config.json; the patch restores these settings but should not require additional code changes if they were correctly specified originally.
Patch guidance
Determine your current Angular version using ng version or by inspecting package.json. If you are on Angular 19, 20, 21, or 22.0-rc, update to the minimum patched version for your major line: 19.2.23+, 20.3.22+, 21.2.15+, or 22.0.0-rc.2+. Use npm/yarn update or update your package.json and reinstall dependencies. Test the updated application in a staging environment to confirm Service Worker behavior and request handling before production deployment. Monitor your application logs for any Service Worker lifecycle events or cache misses during rollout.
Detection guidance
Review your Angular application's dependencies for Service Worker version exposure via package.json or package-lock.json. In a staging environment, enable Service Worker debugging in Chrome DevTools (Application → Service Workers) and inspect network requests to confirm credentials policies are honored post-patch. Audit your ngsw-config.json for intentional credential and cache directives; log or monitor outbound requests to verify that credentials: 'omit' directives result in requests without Authorization headers or cookies. For cached content, inspect browser storage (Application → Cache Storage) to confirm sensitive responses are not persisted.
Why prioritize this
Although the CVSS score is MEDIUM (6.1), the vulnerability directly compromises request-level security controls and session isolation that developers explicitly configured. Session leakage and unintended caching of private data are high-confidence, reproducible outcomes affecting user privacy and authentication integrity. Organizations with Service Workers handling authenticated user data should prioritize patching, particularly if their applications process sensitive or regulated data. The fix is straightforward and low-risk, making rapid deployment feasible.
Risk score, explained
The CVSS 3.1 score of 6.1 reflects a network-accessible vulnerability (AV:N) with low attack complexity (AC:L) and no privilege requirement (PR:N), but requiring user interaction (UI:R) to exploit. The scope is changed (S:C), indicating the vulnerability can affect resources beyond the vulnerable component. Confidentiality and integrity impacts are both low (C:L, I:L) because exposed data is limited to what the user's session can access, and cache modification is constrained to the client side. The score appropriately reflects the practical risk: meaningful but not critical, warranting timely remediation rather than emergency response.
Frequently asked questions
Does this vulnerability affect Angular applications that don't use @angular/service-worker?
No. The vulnerability is specific to the @angular/service-worker package. If your application does not explicitly import or configure the service-worker module, it is not affected. You can verify this by searching your package.json and source code for references to @angular/service-worker.
What is the difference between the credential leak and the caching issue?
The credential leak occurs during request reconstruction: the Service Worker strips your credentials: 'omit' directive and sends cookies/tokens anyway, exposing them in outgoing traffic. The caching issue is separate: resources you marked as non-cacheable or private are stored in the Service Worker's cache, persisting sensitive page state in local storage. Both stem from the same root cause—the helper function stripping your security settings—but have different impact vectors.
Will upgrading the Service Worker package alone fix this, or do I need to update all of Angular?
You should update both @angular/service-worker and the core Angular package to a patched version for your major line. While theoretically the Service Worker update is the minimum, Angular versions often have interdependencies. Verify against the official Angular release notes to confirm your specific upgrade path, but bundling the updates minimizes risk and ensures compatibility.
After patching, do I need to manually clear user caches or redeploy with a new Service Worker version hash?
Service Worker caches can persist after a deployment if the Service Worker file hash does not change or if your cache invalidation strategy is not triggered. For this fix, verify that your ngsw-config.json is correct and consider using a Service Worker version bump or explicit cache name change to force browsers to re-download the updated worker. Testing in staging with cache inspection (via DevTools) is recommended before production rollout.
This analysis is for informational purposes and represents a snapshot of vulnerability intelligence as of the publication date. CVSS scores, patch versions, and vendor remediation guidance are sourced from official CVE records and vendor advisories; verify against the latest Angular security releases before deploying patches. This vulnerability requires user interaction and does not constitute an active threat or zero-day. Always test patches in a staging environment before production deployment. Consult official Angular documentation and your organization's change management process for deployment timelines. SEC.co and this analysis assume no liability for misapplication or incomplete remediation. Source: NVD (public-domain), retrieved 2026-07-28. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-50169MEDIUMAngular Service Worker Redirect Policy Bypass Vulnerability
- CVE-2026-54264MEDIUMAngular Service Worker Cross-Origin Credential Leak Vulnerability
- CVE-2026-50170HIGHAngular SSR Credential Caching & Data Leakage Vulnerability
- CVE-2026-10254MEDIUMUnauthenticated Information Disclosure in SourceCodester Pet Grooming Software
- CVE-2026-10854MEDIUMMISP Galaxy Visibility Control Bypass – Unauthorized Private Metadata Access
- CVE-2026-10864MEDIUMMISP Dashboard Widget Field Filtering Bypass (Medium)
- CVE-2026-11162MEDIUMChrome CSS Cross-Origin Data Leak Vulnerability
- CVE-2026-11168MEDIUMChrome Extension Memory Disclosure Vulnerability