Servers and applications
GHSA-xv7p-c2jx-4fj7
Cross-Site Scripting (XSS) via AngularJS Double Compilation in @angular/upgrade's downgradeComponent() (Incomplete fix for GHSA-ffj9-42qx-f38h)
- Severity
- Medium 6.3
- Published
- 3 Dec 2026
- Last changed
- 3 Dec 2026
- Added to UpHeron
- 3 Dec 2026
- Fixed in
- 20.3.36, 21.2.27, 22.3.2
- Weakness
- Cross-site scripting (CWE-79)
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- CVSS vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N- Sources
- Project advisories (GitHub)
Description
An incomplete fix for GHSA-ffj9-42qx-f38h in @angular/upgrade's downgradeComponent() allows Cross-Site Scripting (XSS) via AngularJS template double compilation in hybrid Angular / AngularJS applications.
To address GHSA-ffj9-42qx-f38h, downgradeComponent() moved template child-node capture from DowngradeComponentAdapter.compileContents() (post-linking) into the AngularJS directive's controller function, assuming that controllers execute before other directives modify the host element.
However, AngularJS instantiates directive controllers during the linking phase, and the directive registered by downgradeComponent() specifies terminal: true with the default priority (0). Consequently, several AngularJS lifecycle hooks still execute before the downgraded component's controller runs:
- Co-located directives on the same host element with priority > 0 whose controller writes into $element (including AngularJS's built-in ng-controller at priority 500).
Workarounds
If you cannot immediately upgrade to a patched version:
- Do not place AngularJS directives whose controller writes or mutates element contents (such as ng-controller or custom directives) directly on a downgraded component's host element. Move the directive onto an inner child element () or pass the value via an Angular @Input() property binding ().
- Avoid mutating a descendant downgraded component's host element contents from ancestor directive controller or preLink hooks.
Affected software
| Software | Affected versions |
|---|---|
AngularServers and applications · github:angular/angular |
|
About Angular
web application framework
- Developers who used it in the past year
- 18.2%Stack Overflow Developer Survey 2025, 2025
- Weekly downloads (npm)
- 8,137,424npm, 29 Nov 2026
- GitHub stars
- 101,589GitHub, 29 Nov 2026
- Forks
- 28,060GitHub, 29 Nov 2026
- Latest release
- v22.3.1GitHub, 29 Nov 2026
- Released
- 25 Nov 2026GitHub
- Developer
- GoogleWikidata
- License
- MIT LicenseWikidata
- Written in
- TypeScriptWikidata
- First released
- 15 Sept 2016Wikidata
- First published on GitHub
- 18 Sept 2014GitHub
Release lines
| Release | Latest | Security fixes |
|---|---|---|
| 22 | 22.3.1 | Until 30 Jun 2028 |
| 21 | 21.2.26 | Until 30 Jun 2027 |
| 20 | 20.3.35 | Ended 28 Nov 2026 |
| 19 | 19.2.25 | Ended 19 May 2026 |
| 18 | 18.2.14 | Ended 21 Nov 2025 |
| 17 | 17.3.12 | Ended 15 May 2025 |
From endoflife.date.
Vulnerabilities in Angular
- In our list
- 40
- Published in the last 12 months
- 37
- Critical, last 12 months
- 1
- High, last 12 months
- 24
- Known exploited
- 0
- GHSA-ffj9-42qx-f38hCross-Site Scripting (XSS) via AngularJS Double Compilation in @angular/upgrade's downgradeComponent()Medium 6.3 9 Nov 2026
- CVE-2026-111753XSRF Token Leakage via URL Parsing Discrepancy in Angular HTTP Client (Incomplete fix for CVE-2025-66035)Medium 5.9 16 Oct 2026
- CVE-2026-111751Denial of Service via RouterLink Query Parameter Retention in Server-Side Rendering (SSR)High 8.2 1 Oct 2026
- CVE-2026-111752Denial of Service via Unmatched Empty-Path Outlet Route Matching in Server-Side Rendering (SSR)High 8.2 30 Sept 2026
- CVE-2026-111754Open Redirect via Protocol-Relative URLs in Server-Side Rendering (SSR)Medium 5.1 30 Sept 2026
- CVE-2026-101896Denial of Service via Numeric URL Matrix Parameters in Server-Side Rendering (SSR)High 8.2 23 Sept 2026
References
- GitHub Advisory Database https://github.com/advisories/GHSA-xv7p-c2jx-4fj7
- github.com https://github.com/angular/angular/security/advisories/GHSA-xv7p-c2jx-4fj7