The compiler and runtime in @angular/core and @angular/compiler may omit or select an incorrect sanitizer for security-sensitive directive host bindings. This occurs because the `SecurityContext` is derived from the declaring directive or component selector instead of the concrete host element. This mismatch can be triggered via `hostDirectives` composition, inherited `HostBinding` declarations, `createComponent` with a custom `hostElement` or dynamic directives, SVG/MathML namespace elements, and tag-neutral selectors such as `:not(...)`. Consequently, attacker-controlled values assigned to `href`, `src`, `action`, `xlink:href`, or `data` can bypass Angular's built-in sanitizer and execute arbitrary JavaScript in the user's browser context, leading to Cross-Site Scripting (XSS).