CVE-2025-2336 AngularJS improper sanitization in SVG '<image>' element with 'ngSanitize'

Medium 4.8 Published Updated

Attackers can bypass image source restrictions in AngularJS ngSanitize, enabling content spoofing and potential denial of service via malicious SVG images.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2025-2336?

CVE-2025-2336 is a medium-severity cross-site scripting vulnerability in Google AngularJS, published on 4 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Improper sanitization of the value of the 'href' and 'xlink:href' attributes in '<image>' SVG elements in AngularJS's 'ngSanitize' module allows attackers to bypass common image source restrictions. This can lead to a form of Content Spoofing https://owasp.org/www-community/attacks/Content_Spoofing  and also negatively affect the application's performance and behavior by using too large or slow-to-load images.

This issue affects AngularJS versions greater than or equal to 1.3.1.

Note: The AngularJS project is End-of-Life and will not receive any updates to address this issue. For more information see here https://docs.angularjs.org/misc/version-support-status .

Weakness: CWE-791

Which versions are affected by CVE-2025-2336?

2 open source packages ship an affected version, including angular-sanitize.

PackageAffectedFixed in
angular-sanitize npmFrom 1.3.1 to 1.8.3None
angular-sanitize npmFrom 1.3.1 to 1.8.3None

How do I fix CVE-2025-2336?

Product is end of life, replace it.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2025-2336 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-2336 exists.

Sources

Also known as CLSA-2026-1775694723, CLSA-2026-1775694727, CLSA-2026-1781657704, CLSA-2026-1786355374, DEBIAN-CVE-2025-2336, GHSA-4p4w-6hg8-63wx and 3 more.

Is CVE-2025-2336 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free