Description
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/core package allows bypassing script-execution restrictions during dynamic component creation. Specifically, the dynamic component instantiation mechanism (createComponent) failed to reject mounting components directly onto a <script> or namespaced script element (such as <svg:script>). This enabled the initialization of custom components on a tag that executes scripts, allowing attackers to hijack or inject script-executing hosts. This flaw enables an attacker who can control the host element or selector parameter passed to createComponent to initialize or mount an Angular component directly onto a <script> tag, leading to execution of untrusted code or client-side Cross-Site Scripting (XSS). This vulnerability is fixed in 22.0.0-rc.2, 21.2.15, 20.3.22, and 19.2.23.
Published: 2026-06-22
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Angular’s @angular/core dynamic component creation API contains a flaw that allows a component to be mounted directly onto a <script> or namespaced script element. Because createComponent accepts a selector string that may come from untrusted input, an attacker can cause the framework to instantiate a component on a tag that executes scripts. The flaw enables the attacker to execute arbitrary code in the client’s browser, resulting in client‑side Cross‑Site Scripting. The vulnerability represents a combination of input validation (CWE‑79) and component selector handling (CWE‑791) weaknesses.

Affected Systems

Angular framework versions prior to 22.0.0‑rc.2, 21.2.15, 20.3.22, and 19.2.23 in the @angular/core package are vulnerable. Upgrading to any release that incorporates the fix removes the vulnerability.

Risk and Exploitability

The CVSS score of 5.3 places the vulnerability in the moderate severity range. The EPSS score is less than 1% indicating a very low likelihood of exploitation to date, and it is not listed in CISA’s KEV catalog. The flaw can be exploited without privileged access; an application that forwards user input to createComponent can be abused to inject a <script> tag that runs arbitrary JavaScript. While the CVE description does not detail downstream impacts, it is inferred that, as a result of script execution, an attacker could potentially steal information or alter the user’s experience.

Generated by OpenCVE AI on July 29, 2026 at 23:36 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the @angular/core package to any release that includes the 22.0.0‑rc.2, 21.2.15, 20.3.22, or 19.2.23 fixes or newer.
  • If upgrading is not immediately possible, validate any selector or host element passed to createComponent; reject values that target <script> or namespaced script tags and avoid using user‑controlled input for that call.
  • Implement a strict Security Policy that blocks inline script execution to mitigate any residual XSS risk.

Generated by OpenCVE AI on July 29, 2026 at 23:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-692r-grfm-v8x7 @angular/core: Angular Template and Dynamic Component Namespace Bypass leading to Cross-Site Scripting (XSS)
History

Thu, 09 Jul 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-791
References
Metrics threat_severity

None

cvssV3_1

{'score': 6.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:N'}

threat_severity

Moderate


Mon, 22 Jun 2026 18:00:00 +0000

Type Values Removed Values Added
First Time appeared Angular
Angular angular
Vendors & Products Angular
Angular angular

Mon, 22 Jun 2026 16:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 22 Jun 2026 15:45:00 +0000

Type Values Removed Values Added
Description 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/core package allows bypassing script-execution restrictions during dynamic component creation. Specifically, the dynamic component instantiation mechanism (createComponent) failed to reject mounting components directly onto a <script> or namespaced script element (such as <svg:script>). This enabled the initialization of custom components on a tag that executes scripts, allowing attackers to hijack or inject script-executing hosts. This flaw enables an attacker who can control the host element or selector parameter passed to createComponent to initialize or mount an Angular component directly onto a <script> tag, leading to execution of untrusted code or client-side Cross-Site Scripting (XSS). This vulnerability is fixed in 22.0.0-rc.2, 21.2.15, 20.3.22, and 19.2.23.
Title Angular Template and Dynamic Component Namespace Bypass leading to Cross-Site Scripting (XSS)
Weaknesses CWE-79
References
Metrics cvssV4_0

{'score': 5.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-22T15:59:33.229Z

Reserved: 2026-06-08T14:00:43.571Z

Link: CVE-2026-52725

cve-icon Vulnrichment

Updated: 2026-06-22T15:59:26.819Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-06-22T15:18:43Z

Links: CVE-2026-52725 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-29T23:45:03Z

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

  • CWE-791

    Incomplete Filtering of Special Elements