CVE-2026-52725: Angular Unrestricted Selectrootelement

Selecting a component host element dynamically using `selectRootElement` with a variable selector bypasses tag name validation and allows XSS. Attackers could direct the component to mount onto a `<script>` tag, resulting in script execution when internal properties are rendered natively. Ensure that the selected element's `tagName` is re-validated against `

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0TS
greprules fetch cve-2026-52725-angular-unrestricted-selectrootelement --engine opengrep

Description

Selecting a component host element dynamically using `selectRootElement` with a variable selector bypasses tag name validation and allows XSS. Attackers could direct the component to mount onto a `<script>` tag, resulting in script execution when internal properties are rendered natively. Ensure that the selected element's `tagName` is re-validated against `