Content Spoofing Vulnerability in Angular.js - Improper Sanitization of SVG Attributes
Summary
DEBIAN-CVE-2025-2336: Improper sanitization of the value of the 'href' and 'xlink:href' attributes in '' SVG elements in AngularJS's 'ngSanitize' module allows attackers to bypass common image source restrictions. Affects angular.js versions < 1.8.3-1+deb12u1~deb11u1. Fixed in 1.8.3-1+deb12u1~deb11u1. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Angular.js is a widely-used JavaScript framework designed for building dynamic web applications. It allows developers to create single-page applications with a rich user experience. The framework includes a module called 'ngSanitize' that is intended to sanitize HTML content to prevent security vulnerabilities. However, a recent vulnerability has been identified that affects the handling of SVG elements, specifically the 'href' and 'xlink:href' attributes, which can lead to serious security issues.
Vulnerability Detail
The vulnerability arises from improper sanitization of the 'href' and 'xlink:href' attributes in '<image>' SVG elements within AngularJS's 'ngSanitize' module. This flaw allows attackers to bypass common image source restrictions, potentially leading to content spoofing attacks. Such attacks can mislead users by displaying malicious content or images, and they can also degrade application performance by loading excessively large or slow images. This issue affects all AngularJS versions greater than or equal to 1.3.1, and it is critical to note that the AngularJS project is End-of-Life, meaning no further updates will be provided to address this vulnerability.
How To Fix
Minimum fixed version
1.8.3-1+deb12u1~deb11u1
This is the first release that contains the fix.
sudo apt-get install --only-upgrade angular.js
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a workaround, consider implementing additional validation and sanitization measures in your application to filter and restrict the use of SVG elements. This can help mitigate the risk of content spoofing until the package can be updated.
Conclusion
The identified vulnerability in Angular.js poses significant risks due to improper sanitization of SVG attributes. It is crucial for developers to update their packages to the latest patched versions to protect their applications from potential attacks. Additionally, implementing workarounds can help mitigate risks until updates are applied.
See every vulnerability recorded for angular.js →
FAQ
The vulnerability is related to improper sanitization of SVG attributes, which can allow attackers to bypass restrictions and perform content spoofing.
All versions of Angular.js greater than or equal to 1.3.1 are affected by this vulnerability.
Yes, patched versions are available for Debian 11, 13, and 14. Users should update to the specified versions to mitigate the risk.
The vulnerability can lead to content spoofing attacks, misleading users, and negatively affecting application performance.
You can use Vulert, which monitors and alerts for open-source vulnerabilities. Check your application against this vulnerability using the Vulert playground at Vulert Scanner.
References
Related vulnerabilities
Recent vulnerabilities recorded for angular.js.