The vulnerability (CVE-2025-2336) stems from improper sanitization within AngularJS's ngSanitize module, specifically in the $sanitize service. When SVG support is enabled (via $sanitizeProvider.enableSvg(true)), the $sanitize service fails to correctly identify and apply configured image source restrictions (from $compileProvider.imgSrcSanitizationTrustedUrlList()) to the href and xlink:href attributes of SVG <image> elements. This allows attackers to bypass these restrictions, leading to content spoofing by embedding images from arbitrary domains, and potentially causing performance issues with large or slow-loading images.
The primary vulnerable function is $sanitize itself, as it contains the defective logic. However, other components that utilize $sanitize for processing HTML content also become vulnerable. These include the linkyFilter (from the ngSanitize module) and the ngBindHtml directive (a core directive that uses $sanitize when available). If these components are fed attacker-controlled input that includes the specially crafted SVG <image> tags, they will invoke the vulnerable $sanitize service, thus exposing the application.
Since AngularJS is End-of-Life, no official patches address this issue. The identification of vulnerable functions is based on the detailed vulnerability analysis provided by third parties like HeroDevs.