Intel

AIKIDO-2026-888246

@angular/core is vulnerable to Cross-Site Scripting (XSS)

Cross-Site Scripting (XSS)GHSA-jj27-h5hq-8x99 Published 4 days ago

76

High Risk

This Affects:

JS@angular/core
0.0.1 - 20.3.26
Fixed in 20.3.27
21.0.0 - 21.2.18
Fixed in 21.2.19
22.0.0 - 22.0.0
Fixed in 22.0.1
Are you affected? Scan for Free

TL;DR

Angular contains a cross-site scripting (XSS) vulnerability in its internationalization (i18n) pipeline. Applications that mark static event handler attributes (such as onerror or onclick) for translation using i18n-on* may allow a malicious translation file to replace benign handlers with arbitrary JavaScript, resulting in code execution in users' browsers. Successful exploitation requires an attacker to control or influence the translation files used during localization.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range. And you are using Angular's i18n functionality and mark static event handler attributes (such as onerror or onclick) for translation using i18n-on*.

Background info

@angular/core is vulnerable to Cross-Site Scripting (XSS) in versions 0.0.1 - 20.3.26, 21.0.0 - 21.2.18 and 22.0.0 - 22.0.0.

How to fix this

Upgrade the @angular/core and @angular/compiler library to the patch version. If this is not possible, do not mark event handler attributes for translation using i18n-on*, and only use translation files from trusted sources.