Skip to content

Commit ca2eac6

Browse files
1 parent 81d6d52 commit ca2eac6

3 files changed

Lines changed: 419 additions & 0 deletions

File tree

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-692r-grfm-v8x7",
4+
"modified": "2026-06-15T16:51:36Z",
5+
"published": "2026-06-15T16:51:35Z",
6+
"aliases": [
7+
"CVE-2026-52725"
8+
],
9+
"summary": "@angular/core: Angular Template and Dynamic Component Namespace Bypass leading to Cross-Site Scripting (XSS)",
10+
"details": "An issue in the `@angular/core` package allows bypassing script-execution restrictions during dynamic component creation.\n\nSpecifically, 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.\n\nThis 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).\n\n### Impact\nAny Angular application that registers dynamic components based on user-supplied parameters (like selectors or host elements) is vulnerable to this security bypass.\n\nOnce exploited, this allows a malicious actor to mount a dynamic component on a script tag, bypassing core dynamic component creation safeguards to execute arbitrary JavaScript within the target user's browser context. This could lead to session hijacking, sensitive data exposure, or unauthorized actions on behalf of the user.\n\n### Attack Preconditions\nTo successfully exploit these vulnerabilities, the following environment parameters and application states must all concurrently exist:\n1. **User-Controlled Host Selection:** The application must accept user-controlled inputs that are passed as a selector/host element to `createComponent`.\n2. **Absence of Additional Context Sanitization:** The application does not perform separate input sanitization before feeding values to the dynamic creation APIs.\n\n### Patches\n* 22.0.0-rc.2\n* 21.2.15\n* 20.3.22\n* 19.2.23",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "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"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "@angular/core"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "21.0.0-next.0"
29+
},
30+
{
31+
"fixed": "21.2.15"
32+
}
33+
]
34+
}
35+
]
36+
},
37+
{
38+
"package": {
39+
"ecosystem": "npm",
40+
"name": "@angular/core"
41+
},
42+
"ranges": [
43+
{
44+
"type": "ECOSYSTEM",
45+
"events": [
46+
{
47+
"introduced": "22.0.0-next.0"
48+
},
49+
{
50+
"fixed": "22.0.0-rc.2"
51+
}
52+
]
53+
}
54+
]
55+
},
56+
{
57+
"package": {
58+
"ecosystem": "npm",
59+
"name": "@angular/core"
60+
},
61+
"ranges": [
62+
{
63+
"type": "ECOSYSTEM",
64+
"events": [
65+
{
66+
"introduced": "19.0.0-next.0"
67+
},
68+
{
69+
"fixed": "19.2.23"
70+
}
71+
]
72+
}
73+
],
74+
"database_specific": {
75+
"last_known_affected_version_range": "< 19.2.22"
76+
}
77+
},
78+
{
79+
"package": {
80+
"ecosystem": "npm",
81+
"name": "@angular/core"
82+
},
83+
"ranges": [
84+
{
85+
"type": "ECOSYSTEM",
86+
"events": [
87+
{
88+
"introduced": "0"
89+
},
90+
{
91+
"last_affected": "18.2.14"
92+
}
93+
]
94+
}
95+
]
96+
},
97+
{
98+
"package": {
99+
"ecosystem": "npm",
100+
"name": "@angular/core"
101+
},
102+
"ranges": [
103+
{
104+
"type": "ECOSYSTEM",
105+
"events": [
106+
{
107+
"introduced": "20.0.0-next.0"
108+
},
109+
{
110+
"fixed": "20.3.22"
111+
}
112+
]
113+
}
114+
]
115+
}
116+
],
117+
"references": [
118+
{
119+
"type": "WEB",
120+
"url": "https://github.com/angular/angular/security/advisories/GHSA-692r-grfm-v8x7"
121+
},
122+
{
123+
"type": "WEB",
124+
"url": "https://github.com/angular/angular/pull/68686"
125+
},
126+
{
127+
"type": "WEB",
128+
"url": "https://github.com/angular/angular/pull/68713"
129+
},
130+
{
131+
"type": "PACKAGE",
132+
"url": "https://github.com/angular/angular"
133+
}
134+
],
135+
"database_specific": {
136+
"cwe_ids": [
137+
"CWE-79"
138+
],
139+
"severity": "MODERATE",
140+
"github_reviewed": true,
141+
"github_reviewed_at": "2026-06-15T16:51:35Z",
142+
"nvd_published_at": null
143+
}
144+
}
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-p3vc-36g9-x9gr",
4+
"modified": "2026-06-15T16:52:30Z",
5+
"published": "2026-06-15T16:52:30Z",
6+
"aliases": [
7+
"CVE-2026-50171"
8+
],
9+
"summary": "@angular/common: Denial of Service (DoS) via OOM in Number Formatting (digitsInfo)",
10+
"details": "A Denial of Service (DoS) vulnerability exists in the `@angular/common` package of Angular. The `formatNumber` function, which is also utilized by `DecimalPipe`, `PercentPipe`, and `CurrencyPipe`, does not properly validate the upper bounds of the `digitsInfo` parameter. Specifically, the minimum and maximum fraction digits parsed from the `digitsInfo` string (e.g., `1.2-4`) are converted to integers and used without limits.\n\nWhen parsing a maliciously crafted `digitsInfo` string with excessively large fraction digit values (e.g., `1.200000000-200000000`), the internal `roundNumber` function attempts to pad the digits array to match the requested fraction size. This results in an unbounded loop that repeatedly pushes elements into an array.\n\n### Impact\n\nSuccessful exploitation of this vulnerability allows an attacker to trigger resource exhaustion, leading to a Denial of Service (DoS):\n\n* **Server-Side Rendering (SSR):** In applications using SSR (e.g., `@angular/ssr`), an attacker can crash the Node.js server process due to a `JavaScript heap out of memory` error. This affects the availability of the application for all users. \n* **Client-Side Rendering (CSR):** In standard client-side applications, the unbounded loop will block the main thread, freezing the user's browser tab and making it unresponsive.\n\n### Attack Preconditions\n\nFor this vulnerability to be exploitable, the following conditions must be met:\n\n1. **Vulnerable Component Usage:** The application must use Angular's number formatting utilities, such as the `formatNumber` function directly, or via template pipes (`DecimalPipe`, `PercentPipe`, `CurrencyPipe`). \n2. **Attacker-Controlled Parameter:** The `digitsInfo` parameter passed to these utilities must be customizable or directly controlled by untrusted user input (e.g., parsed from query parameters, user preference settings, or API responses that accept user-defined formatting options). If `digitsInfo` is trusted or limited to a known, defined range for its value, the vulnerability is not exploitable by external attackers.\n\n### Patches\n- 22.0.0-rc.2\n- 21.2.15\n- 20.3.22\n- 19.2.23\n\n### Credits\nThis vulnerability was discovered and reported by [CodeMender from Google DeepMind](https://deepmind.google/blog/introducing-codemender-an-ai-agent-for-code-security/).",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "@angular/common"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "22.0.0-next.0"
29+
},
30+
{
31+
"fixed": "22.0.0-rc.2"
32+
}
33+
]
34+
}
35+
]
36+
},
37+
{
38+
"package": {
39+
"ecosystem": "npm",
40+
"name": "@angular/common"
41+
},
42+
"ranges": [
43+
{
44+
"type": "ECOSYSTEM",
45+
"events": [
46+
{
47+
"introduced": "20.0.0-next.0"
48+
},
49+
{
50+
"fixed": "20.3.22"
51+
}
52+
]
53+
}
54+
]
55+
},
56+
{
57+
"package": {
58+
"ecosystem": "npm",
59+
"name": "@angular/common"
60+
},
61+
"ranges": [
62+
{
63+
"type": "ECOSYSTEM",
64+
"events": [
65+
{
66+
"introduced": "19.0.0-next.0"
67+
},
68+
{
69+
"fixed": "19.2.23"
70+
}
71+
]
72+
}
73+
]
74+
},
75+
{
76+
"package": {
77+
"ecosystem": "npm",
78+
"name": "@angular/common"
79+
},
80+
"ranges": [
81+
{
82+
"type": "ECOSYSTEM",
83+
"events": [
84+
{
85+
"introduced": "0"
86+
},
87+
{
88+
"last_affected": "18.2.14"
89+
}
90+
]
91+
}
92+
]
93+
},
94+
{
95+
"package": {
96+
"ecosystem": "npm",
97+
"name": "@angular/common"
98+
},
99+
"ranges": [
100+
{
101+
"type": "ECOSYSTEM",
102+
"events": [
103+
{
104+
"introduced": "21.0.0-next.0"
105+
},
106+
{
107+
"fixed": "21.2.15"
108+
}
109+
]
110+
}
111+
]
112+
}
113+
],
114+
"references": [
115+
{
116+
"type": "WEB",
117+
"url": "https://github.com/angular/angular/security/advisories/GHSA-p3vc-36g9-x9gr"
118+
},
119+
{
120+
"type": "WEB",
121+
"url": "https://github.com/angular/angular/pull/68840"
122+
},
123+
{
124+
"type": "PACKAGE",
125+
"url": "https://github.com/angular/angular"
126+
}
127+
],
128+
"database_specific": {
129+
"cwe_ids": [
130+
"CWE-400",
131+
"CWE-834"
132+
],
133+
"severity": "HIGH",
134+
"github_reviewed": true,
135+
"github_reviewed_at": "2026-06-15T16:52:30Z",
136+
"nvd_published_at": null
137+
}
138+
}

0 commit comments

Comments
 (0)