Content Spoofing Vulnerability in Angular.js - Improper Sanitization of SVG Attributes

angular.js Updated 02 Oct 2025

Summary

04/06/2025
N/A
Yes i
Unrated
Not published

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 ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

Related vulnerabilities

Recent vulnerabilities recorded for angular.js.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback