Skip to content

Commit 0c87195

Browse files
1 parent 2cff387 commit 0c87195

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

advisories/github-reviewed/2026/03/GHSA-g93w-mfhg-p222/GHSA-g93w-mfhg-p222.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"schema_version": "1.4.0",
33
"id": "GHSA-g93w-mfhg-p222",
4-
"modified": "2026-03-16T22:00:05Z",
4+
"modified": "2026-03-17T01:15:50Z",
55
"published": "2026-03-13T20:56:18Z",
66
"aliases": [
77
"CVE-2026-32635"
88
],
99
"summary": "Angular vulnerable to XSS in i18n attribute bindings",
10-
"details": "A Cross-Site Scripting (XSS) vulnerability has been identified in the Angular runtime and compiler. It occurs when the application uses a security-sensitive attribute (for example href on an anchor tag) together with Angular's ability to internationalize attributes. Enabling internationalization for the sensitive attribute by adding `i18n-<attribute>` name bypasses Angular's built-in sanitization mechanism, which when combined with a data binding to untrusted user-generated data can allow an attacker to inject a malicious script. \n\nThe following example illustrates the issue:\n```html\n<a href=\"{{maliciousUrl}}\" i18n-href>Click me</a>\n```\n\nThe following attributes have been confirmed to be vulnerable:\n- `action`\n- `background`\n- `cite`\n- `codebase`\n- `data`\n- `formaction`\n- `href`\n- `itemtype`\n- `longdesc`\n- `poster`\n- `src`\n- `xlink:href`\n\n### Impact\nWhen exploited, this vulnerability allows an attacker to execute arbitrary code within the context of the vulnerable application's domain. This enables:\n- Session Hijacking: Stealing session cookies and authentication tokens.\n- Data Exfiltration: Capturing and transmitting sensitive user data.\n- Unauthorized Actions: Performing actions on behalf of the user.\n\n### Attack Preconditions\n1. The application must use a vulnerable version of Angular.\n2. The application must bind unsanitized user input to one of the attributes mentioned above.\n3. The bound value must be marked for internationalization via the presence of a `i18n-<name>` attribute on the same element.\n\n### Patches\n- 22.0.0-next.3\n- 21.2.4\n- 20.3.18\n- 19.2.20\n\n### Workarounds\nThe primary workaround is to ensure that any data bound to the vulnerable attributes is **never sourced from untrusted user input** (e.g., database, API response, URL parameters) until the patch is applied, or when it is, it shouldn't be marked for internationalization.\n\nAlternatively, users can explicitly sanitize their attributes by passing them through Angular's `DomSanitizer`:\n```ts\nimport {Component, inject, SecurityContext} from '@angular/core';\nimport {DomSanitizer} from '@angular/platform-browser';\n\n@Component({\n template: `\n <form action=\"{{url}}\" i18n-action>\n <button>Submit</button>\n </form>\n `,\n})\nexport class App {\n url: string;\n\n constructor() {\n const dangerousUrl = 'javascript:alert(1)';\n const sanitizer = inject(DomSanitizer);\n this.url = sanitizer.sanitize(SecurityContext.URL, dangerousUrl) || '';\n }\n}\n```",
10+
"details": "A Cross-Site Scripting (XSS) vulnerability has been identified in the Angular runtime and compiler. It occurs when the application uses a security-sensitive attribute (for example href on an anchor tag) together with Angular's ability to internationalize attributes. Enabling internationalization for the sensitive attribute by adding `i18n-<attribute>` name bypasses Angular's built-in sanitization mechanism, which when combined with a data binding to untrusted user-generated data can allow an attacker to inject a malicious script. \n\nThe following example illustrates the issue:\n```html\n<a href=\"{{maliciousUrl}}\" i18n-href>Click me</a>\n```\n\nThe following attributes have been confirmed to be vulnerable:\n- `action`\n- `background`\n- `cite`\n- `codebase`\n- `data`\n- `formaction`\n- `href`\n- `itemtype`\n- `longdesc`\n- `poster`\n- `src`\n- `xlink:href`\n\n### Impact\nWhen exploited, this vulnerability allows an attacker to execute arbitrary code within the context of the vulnerable application's domain. This enables:\n- Session Hijacking: Stealing session cookies and authentication tokens.\n- Data Exfiltration: Capturing and transmitting sensitive user data.\n- Unauthorized Actions: Performing actions on behalf of the user.\n\n### Attack Preconditions\n1. The application must use a vulnerable version of Angular.\n2. The application must bind unsanitized user input to one of the attributes mentioned above.\n3. The bound value must be marked for internationalization via the presence of a `i18n-<name>` attribute on the same element.\n\n### Patches\n- 22.0.0-next.3\n- 21.2.4\n- 20.3.18\n- 19.2.20\n\n### Workarounds\nThe primary workaround is to ensure that any data bound to the vulnerable attributes is **never sourced from untrusted user input** (e.g., database, API response, URL parameters) until the patch is applied, or when it is, it shouldn't be marked for internationalization.\n\nAlternatively, users can explicitly sanitize their attributes by passing them through Angular's `DomSanitizer`:\n```ts\nimport {Component, inject, SecurityContext} from '@angular/core';\nimport {DomSanitizer} from '@angular/platform-browser';\n\n@Component({\n template: `\n <form action=\"{{url}}\" i18n-action>\n <button>Submit</button>\n </form>\n `,\n})\nexport class App {\n url: string;\n\n constructor() {\n const dangerousUrl = 'javascript:alert(1)';\n const sanitizer = inject(DomSanitizer);\n this.url = sanitizer.sanitize(SecurityContext.URL, dangerousUrl) || '';\n }\n}\n```\n\n### References\n- [Fix 1](https://github.com/angular/angular/pull/67541) \n- [Fix 2](https://github.com/angular/angular/pull/67561)",
1111
"severity": [
1212
{
1313
"type": "CVSS_V4",
@@ -82,7 +82,7 @@
8282
"type": "ECOSYSTEM",
8383
"events": [
8484
{
85-
"introduced": "19.0.0.next.0"
85+
"introduced": "19.0.0-next.0"
8686
},
8787
{
8888
"fixed": "19.2.20"
@@ -101,7 +101,7 @@
101101
"type": "ECOSYSTEM",
102102
"events": [
103103
{
104-
"introduced": "17.0.0.next.0"
104+
"introduced": "17.0.0-next.0"
105105
},
106106
{
107107
"last_affected": "18.2.14"
@@ -177,7 +177,7 @@
177177
"type": "ECOSYSTEM",
178178
"events": [
179179
{
180-
"introduced": "19.0.0.next.0"
180+
"introduced": "19.0.0-next.0"
181181
},
182182
{
183183
"fixed": "19.2.20"
@@ -196,7 +196,7 @@
196196
"type": "ECOSYSTEM",
197197
"events": [
198198
{
199-
"introduced": "17.0.0.next.0"
199+
"introduced": "17.0.0-next.0"
200200
},
201201
{
202202
"last_affected": "18.2.14"

0 commit comments

Comments
 (0)